Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kernel confused about processor speed?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
erickfour
n00b
n00b


Joined: 16 Dec 2004
Posts: 32
Location: christchurch, NZ

PostPosted: Tue Feb 01, 2005 9:57 pm    Post subject: kernel confused about processor speed? Reply with quote

hello--

i've been running gentoo for almost a year now on my 3.2Ghz box built on an intel desktop board. it's worked great.

however, about a week ago it started slowing down considerably, perhaps a three fold decrease in speed. so i thought i would upgrade to 2.6.10 from 2.6.1 with the logic that perhaps recompiling the kernel would do the trick. i did, no problem, now i'm running 2.6.10 but same problem.

then i thought that i would run some benchmarks. i emerged lmbench and ran mhz, with the following bizarre results:

[~]$ mhz
3165 MHz, 0.3160 nanosec clock
[~]$ mhz
6384 MHz, 0.1566 nanosec clock
[~]$ mhz
6387 MHz, 0.1566 nanosec clock

however,

[~]$ uname -a
Linux wesley 2.6.10-gentoo-r6 #1 SMP Tue Feb 1 15:21:09 EST 2005 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz GenuineIntel GNU/Linux

mhz seems to be spitting out bizarre things, despite the fact that it works fine on the laptop... can someone help me out here?

thanks in advance,

e
Back to top
View user's profile Send private message
Boohbah
Apprentice
Apprentice


Joined: 17 Oct 2003
Posts: 250
Location: Seattle

PostPosted: Tue Feb 01, 2005 10:01 pm    Post subject: Reply with quote

It sounds like your cpu is overheating. Better check the temperature!
EDIT:
On second thought, maybe the Pentium 4's hyperthreading looks like two separate processors to 'mhz', though i'm not sure, just guessing. :wink:
_________________
Never try to explain computers to a layman. It's easier to explain sex to a virgin.
-- Robert Heinlein

(Note, however, that virgins tend to know a lot about computers.)
Back to top
View user's profile Send private message
n3mo
l33t
l33t


Joined: 28 Mar 2004
Posts: 657
Location: In a Cruel World

PostPosted: Tue Feb 01, 2005 10:07 pm    Post subject: Reply with quote

Double xeon with HT enabled.

Quote:
ludovico@xeon ludovico $ mhz
3999 MHz, 0.2501 nanosec clock


Try recompile it with less aggressive optimization, or take a look at the homepage for a bug.
_________________
Google, really.
Back to top
View user's profile Send private message
erickfour
n00b
n00b


Joined: 16 Dec 2004
Posts: 32
Location: christchurch, NZ

PostPosted: Tue Feb 01, 2005 10:09 pm    Post subject: Reply with quote

boobah---

i don't think that's the problem here. i shut down the computer overnight and it did the same thing in the morning. furthermore, here's mbmon.

[~]$ mbmon

Temp.= 33.8, 42.2, 32.8; Rot.= 0, 1163, 0
Vcore = 1.48, 1.49; Volt. = 3.26, 5.04, 12.00, 0.00, 0.00

34 is certainly within normal range.

thanks for the quick reply tho!

e
Back to top
View user's profile Send private message
JuNix
Apprentice
Apprentice


Joined: 05 Mar 2003
Posts: 226
Location: Sheffield

PostPosted: Tue Feb 01, 2005 10:31 pm    Post subject: Reply with quote

To find your current CPU clock rate :-

Code:
cat /proc/cpuinfo


Do you have CPU frequency scaling turned on? Maybe you have the powersave governor as default, which will run your system at the slowest clockrate your CPU will support.

To find out if you are using CPU frequency scaling :-
Code:
grep CONFIG_CPU_FREQ /usr/src/linux/.config


To find out which governor you are using :-
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor


Examine /var/log/messages to see if you can see anything as to why your box is running slowly. Run "top" when your machine is idle and look for anything out of the ordinary.
Back to top
View user's profile Send private message
erickfour
n00b
n00b


Joined: 16 Dec 2004
Posts: 32
Location: christchurch, NZ

PostPosted: Tue Feb 01, 2005 10:55 pm    Post subject: Reply with quote

bizarre... i built my own machine so i know it's single processor (ha ha) but here is /proc/cpuinfo

processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 3.20GHz
stepping : 9
cpu MHz : 3192.757
cache size : 512 KB
physical id : 0
siblings : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips : 6307.84

processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 3.20GHz
stepping : 9
cpu MHz : 3192.757
cache size : 512 KB
physical id : 0
siblings : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips : 6373.37

hmm...

did i do something funny in make.conf?

CFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe"


also, by the way, i don't have frequency scaling turned on:

[/usr/src/linux-2.6.10-gentoo-r6]$ grep CONFIG_CPU_FREQ .config
# CONFIG_CPU_FREQ is not set

and locate governor only finds some documentation .txt files.

i also don't have anything suprising going on with top. i didn't see anything exceptional in /var/log/messages, but i don't read this too much so perhaps i don't know normal.

thanks, junix
Back to top
View user's profile Send private message
erickfour
n00b
n00b


Joined: 16 Dec 2004
Posts: 32
Location: christchurch, NZ

PostPosted: Wed Feb 02, 2005 12:56 am    Post subject: the plot thickens Reply with quote

hi--

i thought i would add that the root filesystem has gotten corrupted twice today, and i imagine that the source of both problems must be the same.

before it got mounted read-only but for some reason i thought it was a separate problem.

so (computer thinking it has two cpu's) + (root filesystem corruption) = ????

thanks,

e
Back to top
View user's profile Send private message
JuNix
Apprentice
Apprentice


Joined: 05 Mar 2003
Posts: 226
Location: Sheffield

PostPosted: Wed Feb 02, 2005 3:55 pm    Post subject: Reply with quote

You have a 3.2GHz Pentium 4, with Hyperthreading. It should show up as two CPU's and that's normal.

As for the root fs corruption... dunno! Boot from a recovery CD and fsck -y /dev/hdX whatever the device name you are using for root fs.

Soaktest your box overnight using Memtest86 maybe?

There may be a kernel config problem that isn't obvious. I've head of ppl having problems with MTRR's and APIC on dual core CPU's. Try a couple of boot's without them. I think you can pass a "noapic" line into grub or lilo at boot time to disable.

There's lots of stuff about this at the SMP Linux Howto

Also http://kerneltrap.org/node/3683

And, if you do an "uptime", what is the load average reported?
Back to top
View user's profile Send private message
erickfour
n00b
n00b


Joined: 16 Dec 2004
Posts: 32
Location: christchurch, NZ

PostPosted: Wed Feb 02, 2005 11:07 pm    Post subject: likely motherboard problem Reply with quote

well, i ran memtest86 and it crashed, even when i mix-and-matched the DIMM's.

so i'm guessing it was the motherboard. i'm going to get it checked out tomorrow.

e
Back to top
View user's profile Send private message
erickfour
n00b
n00b


Joined: 16 Dec 2004
Posts: 32
Location: christchurch, NZ

PostPosted: Fri Feb 04, 2005 9:02 pm    Post subject: Reply with quote

OK--

so i replaced the motherboard, and so memtest86 no longer crashes.

but the performance is still mighty sluggish!

i tried turning off hyperthreading but no improvement. i have also tried various combinations of APIC and MTRR, still no luck. here is some uptime-related output...


top - 16:00:29 up 1:09, 5 users, load average: 0.69, 0.60, 0.50
Tasks: 64 total, 3 running, 61 sleeping, 0 stopped, 0 zombie
top - 16:01:47 up 1:10, 5 users, load average: 0.82, 0.68, 0.54
Tasks: 56 total, 1 running, 55 sleeping, 0 stopped, 0 zombie
Cpu0 : 0.3% us, 0.3% sy, 0.0% ni, 99.3% id, 0.0% wa, 0.0% hi, 0.0% si
Cpu1 : 0.3% us, 0.3% sy, 0.0% ni, 99.3% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 904680k total, 610012k used, 294668k free, 77568k buffers
Swap: 499960k total, 0k used, 499960k free, 286708k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7500 root 16 0 158m 12m 2516 S 1.0 1.4 0:12.70 X
8788 matsen 16 0 5372 2512 1996 S 0.7 0.3 0:00.07 xterm
1 root 16 0 1344 488 432 S 0.0 0.1 0:00.23 init
2 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
4 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/1
5 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/1
6 root 5 -10 0 0 0 S 0.0 0.0 0:00.01 events/0

[~]$ uptime
16:02:33 up 1:11, 5 users, load average: 0.38, 0.58, 0.51
[~]$ w
16:02:37 up 1:11, 5 users, load average: 0.35, 0.57, 0.51
USER TTY LOGIN@ IDLE JCPU PCPU WHAT
matsen vc/1 14:53 1:09m 3.16s 0.00s /bin/sh /bin/sx
matsen pts/0 14:53 1:09m 0.08s 0.08s bash
matsen pts/1 14:57 3:00 0.18s 0.33s xterm +sb -fn 9x15 -geometry 80
matsen pts/2 16:00 0.00s 0.09s 0.00s w
matsen pts/3 15:33 18:08 0.09s 0.09s bash


nothing terribly suprising there...

any more suggestions?

thanks,

erick
Back to top
View user's profile Send private message
JuNix
Apprentice
Apprentice


Joined: 05 Mar 2003
Posts: 226
Location: Sheffield

PostPosted: Sat Feb 05, 2005 9:15 am    Post subject: Reply with quote

Well.... I wonder how slower your box is running that a known working 3.2Ghz Pentium. you could try the following to find out:

Code:
emerge nbench


Then run the benchmark

Code:
nbench


and compare the results with a known working 3.2GhZ Pentium 4 system

Code:
BYTEmark* Native Mode Benchmark ver. 2 (10/95)
Index-split by Andrew D. Balsa (11/97)
Linux/Unix* port by Uwe F. Mayer (12/96,11/97)
 
TEST                : Iterations/sec.  : Old Index   : New Index
                    :                  : Pentium 90* : AMD K6/233*
--------------------:------------------:-------------:------------
NUMERIC SORT        :
                    :          920.13  :      23.60  :       7.75
STRING SORT         :          54.618  :      24.40  :       3.78
BITFIELD            :       2.304e+08  :      39.52  :       8.26
FP EMULATION        :           89.92  :      43.15  :       9.96
FOURIER             :           13118  :      14.92  :       8.38
ASSIGNMENT          :          21.164  :      80.53  :      20.89
IDEA                :          1330.1  :      20.34  :       6.04
HUFFMAN             :          734.42  :      20.37  :       6.50
NEURAL NET          :          16.256  :      26.11  :      10.98
LU DECOMPOSITION    :          723.56  :      37.48  :      27.07
==========================ORIGINAL BYTEMARK RESULTS==========================
INTEGER INDEX       : 31.741
FLOATING-POINT INDEX: 24.353
Baseline (MSDOS*)   : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0
==============================LINUX DATA BELOW===============================
CPU                 : Dual GenuineIntel Intel(R) Pentium(R) 4 CPU 3.20GHz 3200MHz
L2 Cache            : 512 KB
OS                  : Linux 2.6.5-gentoo-r1
C compiler          : 3.3.3
libc                :
MEMORY INDEX        : 8.664
INTEGER INDEX       : 7.405
FLOATING-POINT INDEX: 13.464
Baseline (LINUX)    : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38
* Trademarks are property of their respective holder.
Back to top
View user's profile Send private message
erickfour
n00b
n00b


Joined: 16 Dec 2004
Posts: 32
Location: christchurch, NZ

PostPosted: Sat Feb 05, 2005 5:54 pm    Post subject: Reply with quote

ok-- it's

Code:

BYTEmark* Native Mode Benchmark ver. 2 (10/95)
Index-split by Andrew D. Balsa (11/97)
Linux/Unix* port by Uwe F. Mayer (12/96,11/97)

TEST                : Iterations/sec.  : Old Index   : New Index
                    :                  : Pentium 90* : AMD K6/233*
--------------------:------------------:-------------:------------
NUMERIC SORT        :          1176.8  :      30.18  :       9.91
STRING SORT         :            71.4  :      31.90  :       4.94
BITFIELD            :      4.2132e+08  :      72.27  :      15.10
FP EMULATION        :          183.84  :      88.21  :      20.36
FOURIER             :           17440  :      19.83  :      11.14
ASSIGNMENT          :          38.314  :     145.79  :      37.82
IDEA                :          2022.3  :      30.93  :       9.18
HUFFMAN             :          1052.9  :      29.20  :       9.32
NEURAL NET          :          29.681  :      47.68  :      20.06
LU DECOMPOSITION    :          1190.2  :      61.66  :      44.52
==========================ORIGINAL BYTEMARK RESULTS==========================
INTEGER INDEX       : 50.242
FLOATING-POINT INDEX: 38.777
Baseline (MSDOS*)   : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0
==============================LINUX DATA BELOW===============================
CPU                 : GenuineIntel Intel(R) Pentium(R) 4 CPU 3.20GHz 3193MHz
L2 Cache            : 512 KB
OS                  : Linux 2.6.10-gentoo-r6
C compiler          : 3.3.5
libc                :
MEMORY INDEX        : 14.126
INTEGER INDEX       : 11.464
FLOATING-POINT INDEX: 21.507
Baseline (LINUX)    : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38
* Trademarks are property of their respective holder.


which seems to be fast! in particular, it's much faster than my laptop (PIII)

OTOH, my laptop starts emacs, firefox, x, and everything else faster. i'm thinking that perhaps this is a disk problem...

i have another HD on the box, which i could clean up. would it be best for me to make it bootable and see how things go running off of that HD? i would first try copying over the existing system and then try rebuilding.

but on the other hand, i ran bonnie and it went quite fast, much faster than the laptop.
hmm....

thanks for all the advice, JuNix.

- e
Back to top
View user's profile Send private message
JuNix
Apprentice
Apprentice


Joined: 05 Mar 2003
Posts: 226
Location: Sheffield

PostPosted: Sun Feb 06, 2005 8:17 am    Post subject: Reply with quote

I don't suspect your CPU or memory any more.

Take a look at the My System is Slower than it Should Be thread. It contains useful stuff.
Back to top
View user's profile Send private message
erickfour
n00b
n00b


Joined: 16 Dec 2004
Posts: 32
Location: christchurch, NZ

PostPosted: Thu Feb 10, 2005 10:36 pm    Post subject: reinstall and HD switch does it Reply with quote

well, i repartitioned my second HD and installed the system on that, and now it's back working perfectly. i don't really know why, which is a bit scary, but i'm happy for the time being.

thanks, everyone.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum