Last night I did some experimenting with CPU frequency scaling on my Inspiron 8500. The Inspiron 8500 is a Pentium 4-M notebook that supports multiple CPU frequencies. When you disconnect the power, CPU speed drops to 1.2Ghz, when it's on the main line, CPU ramps back up to 2.2Ghz.
This can also be controlled via software as well, via the cpufreq_userspace governor. I've installed the powernowd package and it includes a daemon that monitors CPU activity and appropriately sets the CPU frequency depending on the work load at hand.
Currently it's set to the 'aggressive' algorithm, which sets the CPU speed to maximum whenever CPU use goes above 80%, and decreases it by 1000 Mhz when it goes below 20%. This results in the system running at 1.2Ghz most of the time (eg. when it's idle or doing light work) which keeps the heat down and the fan low/off most of the time, but can quickly step up to 2.2Ghz when the computing power is required :)
$> while ( true ); do cat /proc/cpuinfo ; sleep 2; clear; done processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 2 model name : Mobile Intel(R) Pentium(R) 4 - M CPU 2.20GHz stepping : 7 cpu MHz : 1196.886 cache size : 512 KB 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 sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid bogomips : 2368.23
processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 2 model name : Mobile Intel(R) Pentium(R) 4 - M CPU 2.20GHz stepping : 7 cpu MHz : 2194.292 cache size : 512 KB 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 sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid bogomips : 4341.76
I guess this is one of the reasons why I personally like Linux so much, as (if you want to) you can learn how so many low level things work which are often taken for granted on other operating systems.
Instead of "while ( true ); do cat /proc/cpuinfo ; sleep 2; clear; done", you could try the 'watch' command:
watch -n2 cat /proc/cpuinfo
Much nicer!
Posted by: Andrew Savory at September 8, 2004 11:58 AMNice one - thanks Andrew :)
Posted by: Marcus Crafter at September 8, 2004 12:34 PM