Bug#367619: Re: Bug#367619: powernowd: does not consider sys-cpu load
Reading the source, system time is always included in the calculation. There is an option to decide whether to include or exclude nice'd processes, but user, system, irq, and softirq time is always included. In the mean time, I changed the way, powernowd calculates the system's load. I added the iowait time to the calculation (see attached tiny patch). Since then I haven't noticed that powernowd didn't scale up the cpu frequency when the load was high. Even if the name iowait suggests that it's not an active load to the system, there seems to be enough iowait load in certain situations t0 kep powernowd from scaling up the frequency. I'm running this modified powernowd since about 10 days and haven't noticed any negative side effects. Instead, it does exactly what I expect it to do. Any changes to include this change upstream? Thanks, Thomas -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer diff -aur powernowd-0.97.orig/powernowd.c powernowd-0.97/powernowd.c --- powernowd-0.97.orig/powernowd.c 2006-02-13 05:29:24.0 +0100 +++ powernowd-0.97/powernowd.c 2006-06-11 10:01:04.0 +0200 @@ -341,12 +341,14 @@ if (ignore_nice) { usage = (cpu-reading-user - cpu-last_reading-user) + (cpu-reading-system - cpu-last_reading-system) + + (cpu-reading-iowait - cpu-last_reading-iowait) + (cpu-reading-irq - cpu-last_reading-irq) + (cpu-reading-softirq - cpu-last_reading-softirq); } else { usage = (cpu-reading-user - cpu-last_reading-user) + (cpu-reading-mynice - cpu-last_reading-mynice) + (cpu-reading-system - cpu-last_reading-system) + + (cpu-reading-iowait - cpu-last_reading-iowait) + (cpu-reading-irq - cpu-last_reading-irq) + (cpu-reading-softirq - cpu-last_reading-softirq); }
Bug#367619: Re: Bug#367619: powernowd: does not consider sys-cpu load
On Wed, 2006-05-17 at 10:09 +0200, Thomas Schoepf wrote: package: powernowd version: 0.97-1 severity: normal It seems that powernowd does not take into account the current system cpu load, only user cpu load seems to be considered. E.g. VMware has a significant amount of computing load running in system space. Even if the cpu is 100% busy, if the user cpu load part is lower than the threshold (by default 80%) then powernowd won't scale up the cpu frequency. Reading the source, system time is always included in the calculation. There is an option to decide whether to include or exclude nice'd processes, but user, system, irq, and softirq time is always included. I've seen that, too. I don't know yet what the problem is, but every time my system feels slow and powernowd has not scaled up the frequency, the KDE system monitor shows me a noticeable amount of sys cpu load. Thomas -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]