# [solved] cpuinfo shows only 1.6 GHz instead of 2.66 - E7300

## tornamodo

Hey all,

I'm confused by the output of 'cpuinfo' and thought maybe someone could give me a hint why it says CPU MHz 1600 instead of 2600... 

```
$ cat /proc/cpuinfo 

processor    : 0

vendor_id    : GenuineIntel

cpu family   : 6

model        : 23

model name   : Intel(R) Core(TM)2 Duo CPU     E7300  @ 2.66GHz

stepping     : 6

cpu MHz      : 1603.000

cache size   : 3072 KB

physical id  : 0

siblings     : 2

core id      : 0

cpu cores    : 2

apicid       : 0

initial apicid : 0

fdiv_bug     : no

hlt_bug      : no

f00f_bug     : no

coma_bug     : no

fpu          : yes

fpu_exception: yes

cpuid level  : 10

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 lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm

bogomips     : 5319.99

clflush size : 64

power management:

processor    : 1

vendor_id    : GenuineIntel

cpu family   : 6

model        : 23

model name   : Intel(R) Core(TM)2 Duo CPU     E7300  @ 2.66GHz

stepping     : 6

cpu MHz      : 1603.000

cache size   : 3072 KB

physical id  : 0

siblings     : 2

core id      : 1

cpu cores    : 2

apicid       : 1

initial apicid : 1

fdiv_bug     : no

hlt_bug      : no

f00f_bug     : no

coma_bug     : no

fpu          : yes

fpu_exception: yes

cpuid level  : 10

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 lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm

bogomips     : 5320.04

clflush size : 64

power management:

```

Last edited by tornamodo on Thu Nov 06, 2008 9:43 pm; edited 1 time in total

----------

## thestick

reboot

dmesg >> log

nano log.

in the beggining of the log file there is supposed to be some details about how the kernel sees your cpu (some 20 lines or so), maybe you could find some hints there?

----------

## Excluvior

Perhaps kernel cpu frequentie scaling.

----------

## energyman76b

I bet on frequency scaling too.

----------

## tornamodo

 *thestick wrote:*   

> reboot
> 
> dmesg >> log
> 
> nano log.
> ...

 

Here's the dmesg part at the beginning. I'm starting to bet on the frequency as well :p 

i don't know very much about that though... should that really not just work out of the box?

```
...

[    0.004000] AppArmor: AppArmor initialized

[    0.004000] Mount-cache hash table entries: 512

[    0.004000] Initializing cgroup subsys ns

[    0.004000] Initializing cgroup subsys cpuacct

[    0.004000] Initializing cgroup subsys memory

[    0.004000] CPU: L1 I cache: 32K, L1 D cache: 32K

[    0.004000] CPU: L2 cache: 3072K

[    0.004000] CPU: Physical Processor ID: 0

[    0.004000] CPU: Processor Core ID: 0

[    0.004000] using mwait in idle threads.

[    0.004000] Checking 'hlt' instruction... OK.

[    0.017536] ACPI: Core revision 20080609

[    0.019332] ACPI: Checking initramfs for custom DSDT

[    0.273125] ENABLING IO-APIC IRQs

[    0.273290] ..TIMER: vector=0x31 apic1=0 pin1=2 apic2=-1 pin2=-1

[    0.312984] CPU0: Intel(R) Core(TM)2 Duo CPU     E7300  @ 2.66GHz stepping 06

[    0.316019] Booting processor 1/1 ip 6000

[    0.004000] Initializing CPU#1

[    0.004000] Calibrating delay using timer specific routine.. 5319.96 BogoMIPS (lpj=10639925)

[    0.004000] CPU: L1 I cache: 32K, L1 D cache: 32K

[    0.004000] CPU: L2 cache: 3072K

[    0.004000] CPU: Physical Processor ID: 0

[    0.004000] CPU: Processor Core ID: 1

[    0.400541] CPU1: Intel(R) Core(TM)2 Duo CPU     E7300  @ 2.66GHz stepping 06

[    0.400553] checking TSC synchronization [CPU#0 -> CPU#1]: passed.

[    0.404042] Brought up 2 CPUs

[    0.404045] Total of 2 processors activated (10639.92 BogoMIPS).

[    0.404063] CPU0 attaching sched-domain:

[    0.404065]  domain 0: span 0-1 level MC

[    0.404067]   groups: 0 1

[    0.404071] CPU1 attaching sched-domain:

[    0.404073]  domain 0: span 0-1 level MC

[    0.404074]   groups: 1 0

[    0.404134] net_namespace: 840 bytes

[    0.404134] Booting paravirtualized kernel on bare hardware

[    0.404213] Time: 20:58:21  Date: 11/06/08

[    0.404233] NET: Registered protocol family 16

...
```

----------

## tornamodo

seem to have found something interesting... but i may have to move to another forum with this question...  :Razz: 

the system i was asking about has an ubuntu installation, but booting with a gentoo cd "cpuinfo" shows me the correct MHz   :Smile: 

seems the kernel is doing a bad job at scaling the frequency for this cpu. hm...

----------

## energyman76b

with ondemand as default governor, frequency scaling does work out of the box.

----------

## energyman76b

 *tornamodo wrote:*   

> seem to have found something interesting... but i may have to move to another forum with this question... 
> 
> the system i was asking about has an ubuntu installation, but booting with a gentoo cd "cpuinfo" shows me the correct MHz  
> 
> seems the kernel is doing a bad job at scaling the frequency for this cpu. hm...

 

the livecd might not make use of scaling at all. Or is broken.

----------

## tornamodo

I'm trying a few things...

```
root@karam:/sys/devices/system/cpu/cpu0/cpufreq# cat scaling_governor 

ondemand
```

```
s# cpufreq-info 

cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006

Report errors and bugs to linux@brodo.de, please.

analyzing CPU 0:

  driver: acpi-cpufreq

  CPUs which need to switch frequency at the same time: 0 1

  hardware limits: 1.60 GHz - 2.67 GHz

  available frequency steps: 2.67 GHz, 2.40 GHz, 2.14 GHz, 1.87 GHz, 1.60 GHz

  available cpufreq governors: userspace, conservative, ondemand, powersave, performance

  current policy: frequency should be within 1.60 GHz and 2.67 GHz.

                  The governor "ondemand" may decide which speed to use

                  within this range.

  current CPU frequency is 1.60 GHz (asserted by call to hardware).

analyzing CPU 1:

  driver: acpi-cpufreq

  CPUs which need to switch frequency at the same time: 0 1

  hardware limits: 1.60 GHz - 2.67 GHz

  available frequency steps: 2.67 GHz, 2.40 GHz, 2.14 GHz, 1.87 GHz, 1.60 GHz

  available cpufreq governors: userspace, conservative, ondemand, powersave, performance

  current policy: frequency should be within 1.60 GHz and 2.67 GHz.

                  The governor "ondemand" may decide which speed to use

                  within this range.

  current CPU frequency is 1.60 GHz (asserted by call to hardware).

```

----------

## tornamodo

```
root@karam:/sys/devices/system/cpu/cpu0/cpufreq# echo "performance" > scaling_governor 

root@karam:/sys/devices/system/cpu/cpu0/cpufreq# cat scaling_governor 

performance

root@karam:/sys/devices/system/cpu/cpu0/cpufreq# cat /proc/cpuinfo 

processor   : 0

vendor_id   : GenuineIntel

cpu family   : 6

model      : 23

model name   : Intel(R) Core(TM)2 Duo CPU     E7300  @ 2.66GHz

stepping   : 6

cpu MHz      : 2670.000

cache size   : 3072 KB

physical id   : 0

siblings   : 2

core id      : 0

cpu cores   : 2

apicid      : 0

initial apicid   : 0

fdiv_bug   : no

hlt_bug      : no

f00f_bug   : no

coma_bug   : no

fpu      : yes

fpu_exception   : yes

cpuid level   : 10

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 lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm

bogomips   : 5319.97

clflush size   : 64

power management:

processor   : 1

vendor_id   : GenuineIntel

cpu family   : 6

model      : 23

model name   : Intel(R) Core(TM)2 Duo CPU     E7300  @ 2.66GHz

stepping   : 6

cpu MHz      : 2670.000

cache size   : 3072 KB

physical id   : 0

siblings   : 2

core id      : 1

cpu cores   : 2

apicid      : 1

initial apicid   : 1

fdiv_bug   : no

hlt_bug      : no

f00f_bug   : no

coma_bug   : no

fpu      : yes

fpu_exception   : yes

cpuid level   : 10

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 lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm

bogomips   : 5319.95

clflush size   : 64

power management:

```

looks like the governor isn't working correctly...

Thanks for pointing me that way!!

well, maybe it's a feature not a bug...Last edited by tornamodo on Thu Nov 06, 2008 9:39 pm; edited 1 time in total

----------

## energyman76b

and if something loads your cpu, it will automatically scale up. Or you set performance with cpufreq-set -g and see your cpu get hot and your battery drained.

----------

## energyman76b

 *tornamodo wrote:*   

> 
> 
> ```
> root@karam:/sys/devices/system/cpu/cpu0/cpufreq# echo "performance" > scaling_governor 
> 
> ...

 

what the fuck? Everything is working perfectly fine!

----------

## tornamodo

alright, so we call it closed!

i didn't know that linux adjusts the frequency scaling on the fly and that /proc/cpuinfo does not necessarily show the total cpu mhz... am an apprentice  :Razz: 

thanks for showing me  :Smile: 

----------

## energyman76b

you really should read up about scaling and different governors.

The three important ones are:

ondemand

performance

powersave

ondemand adjusts the speed according to load, performance is always top speed. powersave is always slowest possible speed.

You can also set the lowest and highest speed with an

echo XXXXXXX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq with XXXXX the frequency in mhz and

echo XXXXXXX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

----------

