Apparently, though unproven, at 17:14 on Tuesday 10 May 2011, Helmut Jarausch did opine thusly:
> On 05/10/2011 04:57:05 PM, Sebastian Beßler wrote: > > Am 10.05.2011 16:49, schrieb Helmut Jarausch: > > > And that tells me that the CPU is running at full speed (3 GHz in > > > > my > > > > > case) although all CPUs are idle. > > > > What does > > cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor > > and > > cat /sys/devices/system/cpu/cpu0/cpufreq/ > > scaling_available_frequencies > > and > > cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors > > say? > > I have tried > echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/ > scaling_governor > > and now I see an effect but not as good as powernowd > e.g. I have stopped processed temporarily so that the CPU usage fell > down to 1% (max). Still after waiting some minutes, only one core > scaled down to 800 MHz and a a second one to 2.3 GHz. > > At least, powernowd it much more "agressive". > If some cores are idle for a few seconds it scales these down stepwise > to the lowest frequency. The authors of powertop (employed by Intel) researched this topic extensively and wrote up their findings on the project website and in the package docs. In summary, it goes something like this: Userspace cpu freq daemons are a waste of time, it takes excessive energy to step wise change performance up and down. What you really want is for the cpu to run full speed when it has something to do, get it done as quickly as possible then rapidly fall back to the lowest idle speed once the job is complete. That is how the ondemand governor is written. I suppose this step-down-through-the-levels nonsense comes from flawed comparisons with combustion engines and turbines - it makes sense to ramp these up and down. It does not make sense to do this with a cpu as a cpu is a completely different beast altogether. It is either doing something or nothing; actually it never does nothing - it always does something even if that is just the no-op instruction in a loop. And cpus do not "accelerate" like engines and use almost no additional power to go from min to max speed. So when something useful comes along to do, just switch over to max speed and get the job done. Really, this powernowd stuff looks neat on paper but the actual numbers say otherwise. Just enable ondemand, disable everything else, and et the kernel get on with doing what it does best: the kernel should never try and be clever and second guess you, that way lies madness. Similarly, you should never try and be clever and second guess the kernel. That way also lies madness. -- alan dot mckinnon at gmail dot com