Bug 503087 - /proc/cpuinfo shows wrong values for MHz
Summary: /proc/cpuinfo shows wrong values for MHz
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.3
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Prarit Bhargava
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-28 19:15 UTC by Brian Wheeler
Modified: 2009-05-29 15:08 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-05-29 15:08:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Brian Wheeler 2009-05-28 19:15:14 UTC
Description of problem:

/proc/cpuinfo isn't showing the right values for processor speed.


Version-Release number of selected component (if applicable):

Various

How reproducible:

Seems CPU specific, but same on every boot

Steps to Reproduce:
1.  cat /proc/cpuinfo
  
Actual results:

IBM x3755, 2.6.18-128.1.10.el5,  AMD 8220 SE:  correct results

IBM x3650, 2.6.18-128.1.6.el5, Intel 5160 @ 3.00GHz
IBM x3650, 2.6.18-92.1.22.el5, Intel 5160 @ 3.00GHz
IBM x3650, 2.6.18-92.1.6.el5, Intel 5160 @ 3.00GHz
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 15
model name	: Intel(R) Xeon(R) CPU            5160  @ 3.00GHz
stepping	: 6
cpu MHz		: 1998.000


IBM x3650, 2.6.18-92.1.10.el5, Intel E5430 @ 2.66GHz
IBM x3650, 2.6.18-92.1.18.el5, Intel E5430 @ 2.66GHz
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Xeon(R) CPU           E5430  @ 2.66GHz
stepping	: 6
cpu MHz		: 1992.000

IBM x3850, 2.6.18-92.1.18.el5, Intel Xeon 2.66GHz (family 15, model 4, stepping 8):  correct results




Expected results:

cpu MHz = actual speed

Additional info:

Comment 1 Prarit Bhargava 2009-05-29 13:31:14 UTC
>model name : Intel(R) Xeon(R) CPU           E5430  @ 2.66GHz
>stepping : 6
>cpu MHz  : 1992.000

Brian,

Can you do a 'service cpuspeed status' and let me know what it says?

P.

Comment 2 Brian Wheeler 2009-05-29 14:54:17 UTC
It says:

Frequency scaling enabled using ondemand governor


Ah, when I turn it off then cpuinfo has the right speed reported.  I tried loading the machine but it didn't seem to make a difference (I might not have loaded it for enough time, though)

The machines which were reporting the right values had cpuspeed turned off.  Is there an advantage to having cpuspeed turned on when running a server system?

Comment 3 Prarit Bhargava 2009-05-29 15:08:35 UTC
(In reply to comment #2)
> It says:
> 
> Frequency scaling enabled using ondemand governor
> 
> 
> Ah, when I turn it off then cpuinfo has the right speed reported.  I tried
> loading the machine but it didn't seem to make a difference (I might not have
> loaded it for enough time, though)
> 
> The machines which were reporting the right values had cpuspeed turned off.  Is
> there an advantage to having cpuspeed turned on when running a server system?  

Brian,

A few things:

1.  /proc/cpuinfo "model name" field shows just that -- the actual model name as the processor itself indicates.

So, in your case, "Intel(R) Xeon(R) CPU           E5430  @ 2.66GHz" is what the CPU is telling the OS the CPU thinks it is.

2. /proc/cpuinfo "cpu Mhz" is the current CPU frequency, or the "real" frequency that the CPU is running at.  This number fluctuates depending on the load that is applied to the system.

3.  You can find out additional information on cpuspeed by executing a 'man cpuspeed' at a command prompt.

4.  There is an advantage to having cpuspeed "on" on a server -- the system conserves power during low loads, as opposed to leaving the CPUs at their highest frequency.  Or, as a fellow engineer said, "Check your power bill at the end of the month" ;)

P.


Note You need to log in before you can comment on or make changes to this bug.