I have a server that, as of the upgrade to 10.04, is now running the "ondemand" CPU scaling daemon. Why would it automatically install this? I don't want my server saving power at the expense of performance.
|
|
To make all CPUs run at maximum performance continually on a Ubuntu desktop or server, run:
at the shell prompt and enter your password. This disables the shell script that makes all CPUs run at speed "OnDemand", making them default to full speed (Performance). You will need to reboot for this to take effect. I have only tested this in Ubuntu Jaunty 9.04, but it should work and not cause any problems on any version of Ubuntu. I think the Ubuntu defaults are strange for this. A desktop or server should run at full speed, in my opinion. Regards, George |
|||||||||||
|
|
Instead of disabling execution of the
To make the init system not start the script, this is the recognized way of doing it! Disabling the exec permission ( |
|||
|
|
|
You could install the rcconf debian tool:
then disable the "ondemand" service from there. |
|||||||
|
|
Frequency scaling isn't static. As soon as there is work to do, the CPU hops into action, P states boost up, and everything flies. It's enabled because it's widely seen as a good thing. Saves you energy (good for your wallet and the environment). Keeps heat down (so important in a server room). And it's pretty unnoticeable. Moreover on modern Intel chips, if you have scaling on you can use "turbo boost" where one core will run at higher-than-stock speeds for a time. This is very useful for spikes of single-threaded work. Without scaling enabled, you don't get this. |
|||
|
|
I have a new processor AMD Athlon II X4 631 (Fusion processor for socket FM1) and it doesn't save any energy whatsoever (I looked it with energy meter)! I don't have a turbo core, so I don't need ondemand setting. Most new processors save enery by themselves. When benchmarking, there is a little difference, in the range on 1-2%, when comparing ondemand and performance setting. |
|||
|
|
On some systems, the 'ondemand' governor is unfortunately broken. This is the case for "Intel(R) Core(TM)2 Quad CPU Q9300 @ 2.50GHz" and kernel 2.6.32-42. The kernel thinks it can set the frequency individually for each CPU while the hardware actually only allows setting the frequency on groups of several CPUs (e.g. CPU 0 and 1 together, and CPU 2 and 3 together). You may find out that the kernel isn't aware of this by looking at the /sys/devices/system/cpu/cpu*/cpufreq/affected_cpus files which contain "0", "1", "2", "3" instead of "0 1", "0 1", "2 3", "2 3". The visible effect of this missmatch is a single-threaded process that starts running full speed on one CPU (the 'ondemand' governor reacts fast), and then, after about 20 seconds (depends on setting details), looses some of its speed. The reason is the OS, with the 'ondemand' governor, periodically reapplies low freqs on the idle CPUs, not expecting that it will also implicitly change the freq of our busy CPU. It's not even visible when you look at /sys/devices/system/cpu/cpu*/cpufreq/*cur_freq or /proc/cpuinfo, the OS is just not aware of it! So, on these systems the solution is to switch back to the simple 'performance' governor. PS: In my case, running the CPUs constantly at their full freq didn't change anything concerning fan noise. I suppose when a CPU is idling, a lower or higher frequency will not have much impact on its power usage. |
||||
|
|