Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was looking at my processor SPECS on my Ubuntu Linux 11.10 system.

Here is the end of the output of the command cat /proc/cpuinfo:

processor   : 3
vendor_id   : GenuineIntel
cpu family  : 6
model       : 37
model name  : Intel(R) Core(TM) i3 CPU       M 330  @ 2.13GHz
stepping    : 2
cpu MHz     : 933.000
cache size  : 3072 KB
physical id : 0
siblings    : 4
core id     : 2
cpu cores   : 2
apicid      : 5
initial apicid  : 5
fdiv_bug    : no
hlt_bug     : no
f00f_bug    : no
coma_bug    : no
fpu     : yes
fpu_exception   : yes
cpuid level : 11
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 nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm arat dts tpr_shadow vnmi flexpriority ept vpid
bogomips    : 4256.47
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

What I don't get are the lines marked:

model name  : Intel(R) Core(TM) i3 CPU       M 330  @ 2.13GHz
cpu MHz     : 933.000

The processor frequency here is 2.13 GHz on the first line and 933 Mhz on the second. Which is the correct one? Is the 2.13 GHz a refer to the sum of the frequencies of the cores?

Finally, which of these frequency tells me about the cycles per second / clock ticks per second taken by my system clock?

EDIT: In a small extension to Bruno Pereira's nice answer, I found that making a processor operate at different frequencies on the fly is also dynamic frequency scaling or cpu throttling. Here are two webpages which could be of interest:

http://en.wikipedia.org/wiki/Dynamic_frequency_scaling

http://en.wikipedia.org/wiki/SpeedStep

share|improve this question
    
Summing frequencies is meaningless. Frequencies are like speeds, adding them gives you nonsensical results. Can you sum two cars going fifty miles per hour to get 100 miles per hour? –  David Schwartz Jul 28 '12 at 18:53

3 Answers 3

up vote 5 down vote accepted

Linux uses governors to set which stepping your CPU will operate (if your CPU supports stepping settings).

Normally those are set to On Demmand by default which means your CPU's frequency will be lowered when not under intensive usage.

cpufreq-info is an utility to check the steps available from your CPU, which kernel governor is in use currently per core of your CPU and much more information about your CPU capabilities.
It returns something like

cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: powernow-k8
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 8.0 us.
  hardware limits: 800 MHz - 3.00 GHz
  available frequency steps: 3.00 GHz, 2.30 GHz, 1.80 GHz, 800 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 800 MHz and 3.00 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.
  cpufreq stats: 3.00 GHz:10.45%, 2.30 GHz:0.29%, 1.80 GHz:1.72%, 800 MHz:87.55%  (28605)

For more information on how to check and set your CPU stepping from the command line I have created an answer to another question that explains how to do so here, have a look.

You CPUs maximum frequency is 2.13Ghz but unless your Kernel governor is set to Performance your system will, most of it's idle time, lower that frequency.

933Mhz is the lowest stepping available for your CPU and means probably that your system is not under heavy stress at the moment or it is using a power savings governor.

You can test if you get the same results when your system is under load, if the frequency does not change then you are using a Power savings governor and that is keeping your CPU's frequency at 933Mhz all the time.

share|improve this answer
    
Thank you for that wonderful answer. I ran a simple sorting routine on 3 billion integers and during the run I checked the cpu frequency. I found it did jump to 2.13 GHz. –  smilingbuddha Jul 28 '12 at 22:26
    
One question: When people talk about overclocking their processors for gaming, that means they are trying to increase their processor frequency beyond the maximum guaranteed frequency, which i my case is 2.13 MHz, right ? –  smilingbuddha Jul 28 '12 at 22:40
    
@smilingbuddha correct, normally in involves increasing the CPU's multiplier or the system's FSB making it run beyond his factory advised ratings. Creates extra heat, requires better cooling. –  Bruno Pereira Jul 28 '12 at 23:30

The 933 MHz is the current frequency of that CPU core (it's probably running at a lower speed because the syystem is idle), while 2.13 GHZ is the max. frequency. See also the output of the program cpufreq-info.

share|improve this answer
    
The @ 2.13 GHz is part of the model name. It's the frequency the manufacturer of the CPU chose to put in the model name. On many modern CPUs, that's not actually the maximum frequency but it's the maximum guaranteed frequency. –  David Schwartz Jul 28 '12 at 18:52
    
@DavidSchwartz To anyone reading this that is not interested in running their CPUs above the guaranteed frequency, 2.13Ghz is the max frequency for that CPU. Nothing wrong there. –  Bruno Pereira Jul 28 '12 at 20:11
    
@BrunoPereira: That is true for this particular CPU, but it is not true in general due to features like turbo boost. –  David Schwartz Jul 28 '12 at 22:55

CPU frequencies are even more complicated with turbo and c-states.

When a processor is idle and in a c-state, it will report the minimum frequency for that processor, generally as seen in available_scaling_frequencies.

So, even if you choose the performance governor you will see two speeds, the minimum and maximum -- but the minimum frequency is really meaningless, as the CPU isn't doing anything because it is in a c-state.

These values are really directly related to a set of registers, msr 0x199, 0x198, 0x1a0, and 0x1ad which can be read directly via the rdmsr utility if you are curious.

What makes this even more confusing is that the governor requests the maximum frequency available, and there is sufficient thermal room available, the cores can be overclocked, and it will not be reported msr 0x199 nor in cpuinfo. A utility which uses aperf/mperf is necessary to determine if your CPU is operating above the guaranteed speed.

The Model information value is this guaranteed speed. That means that under proper cooling conditions the chip should always be able to run at that frequency. In this example that is 2.13GHz.

The register 0x1ad shows you what Turbo frequencies are available. Your register might look like this on an 8 core EE chip: 1b1b1c1c1d1d1e1e

Each byte indicates the number of CPUs+1 which can be active at that time to get the frequency.

In this case, if 7 or 8 cores are active, the maximum multiplier is 0x1b or 27. The multiplier is generally 100MHz, although another MSR specifies this. So, this EE part is capable of running at 2.7GHz while the guarantee frequency is 2.2GHz. As more CPUs are in c-states/idle, the turbo ratio can go up, to a maximum of 30, or 3.0GHz if only 1 or 2 cores are active.

Because these CPUs are superscalar and can execute out of order operations, and because macro instructions in CISC can take more than one cycle, clock rate is not a meaningful indication of cycles.

Bogomips is an arbitrary indication basically based on the number of no-ops in a cycle, but there are too many variables to simply do performance based on CPU frequency.

More interesting to look at would be the actual instruction performance itself. You can monitor this by using perf tools, and count instructions and other operations in more meaningful ways across workloads.

In general, if you are thermally safe, and you know that you are CPU bound but bursting the CPU and you don't care about power, you can use the performance governor and leave c-states enabled. C-state power savings are significantly higher than any savings due to p-states. Many workloads also benefit from racing to wait in a c-state anyway.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.