ondemand cpufreq governor reacts too slowly
Bug #326149 reported by
Martin Emrich
This bug affects 9 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux |
Fix Released
|
Medium
|
|||
linux (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
I am running current intrepid amd64. CPU is an Athlon X2 4050e on a Gigabyte GA-MA780GM-S2H mainboard.
I noticed that when I switch to the performance governor, most applications (e.g. Firefox, Opera) react much snappier than with the ondemand goveror. It seems like ondemand needs too much time to react to the increased demand for CPU power.
On my laptop (intrepid/jaunty i386, Intel Pentium M 1,7GHz on intel 855PM chipset, ondemand governor), I don't have this problem.
uname -a: Linux daisy-mae 2.6.27-9-generic #1 SMP Thu Nov 20 22:15:32 UTC 2008 x86_64 GNU/Linux
/proc/version_
Changed in linux: | |
importance: | Unknown → Medium |
status: | Unknown → In Progress |
Changed in linux: | |
status: | In Progress → Incomplete |
Changed in linux: | |
status: | Incomplete → Fix Released |
To post a comment you must log in.
As a workaround, I have these lines in my rc.local to fix my two cores:
echo 30 > /sys/devices/ system/ cpu/cpu0/ cpufreq/ ondemand/ up_threshold system/ cpu/cpu1/ cpufreq/ ondemand/ up_threshold
echo 30 > /sys/devices/
The default value of 95 seems tad high. I think it takes about 2 seconds here before CPU speed ramps up from idle, which is very irritating to watch. The lower the value, the faster it seems to react...
As a general rule, there should be a decent application- specific way to opt out of ondemand (while the application is running, it's forbidden to conserve CPU). I have some latency-critical applications that do not react well to the cpu scaler changing the cpu speed underneath them. The application's structure is a fixed length of computation that produces audio in the end. The timing of the calculation is carefully tuned with nanosleep to stop right before audio driver is ready to accept more data to minimize latency. Since the fixed period of computation takes variable time with ondemand jiggling the CPU frequency, it produces audio underruns.