[maverick] CPU frequency does not scale up unless all cores are in use
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux |
Fix Released
|
High
|
|||
linux (Ubuntu) |
Incomplete
|
Medium
|
Unassigned |
Bug Description
Binary package hint: cpufreqd
My system is running the latest version of maverick 64-bit. The CPU is an intel core i5 750 (quad core, 4 threads) and my board is an Intel DP55WG (P55 chipset). The cpu has a default maximum frequency of 2.67 ghz, ignoring the turbo frequency.
While attempting to investigate what's up with this issue:
https:/
I noticed that my CPU was staying at only 1.2 ghz (except for the rare brief moments when it increases.) I observed this using the GNOME CPU frequency scaling monitor (click on a panel, select "add to panel" to find it.)
The CPU frequency scaling monitor has the CPU by default in "ondemand mode". You can force it to full frequency using the "performance" mode. Forcing it into performance mode made the game run faster in the aforementioned issue.
I ran this stress test here: (cpuburn / burnP6)
http://
and I observed that unless I had all 4 instances running, my CPU would stay at 1.2 ghz. With 4 instances running, it would correctly go upto 2.67 ghz. (This was under ondemand mode.) So to reproduce this, run only 1, 2, or 3 instances of cpuburn (if you have a quad-core CPU.) I presume that running only one instance will do the job on a dual-core CPU.
This appears to be a serious bug whereby all cores have to be in (high) use for CPU scaling to work.
There is an ongoing discussion here (where I just posted) about maverick performance that may be related:
http://
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: cpufreqd (not installed)
ProcVersionSign
Uname: Linux 2.6.35-20-generic x86_64
NonfreeKernelMo
Architecture: amd64
Date: Tue Sep 14 03:27:57 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Beta amd64 (20100901.1)
ProcEnviron:
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: cpufreqd
Changed in linux: | |
importance: | Unknown → High |
status: | Unknown → Fix Released |
I have a very similar problem with my core i5 520 M (2 cores, 4 threads).
But, not as the previous case, my CPU never scales up. In fact I never manage to make it scale, it is always blocked to the lowest frequency.
For me, it may be a kernel problem. With the stock kernel provide by Maverick 10.10 Final :
Linux BlackBeast-T410 2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:32:27 UTC 2010 x86_64 GNU/Linux
cpufreq-info shows me for all virtual cores :
analyzing CPU 3:
The governor "ondemand" may decide which speed to use
within this range.
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 3
maximum transition latency: 10.0 us.
hardware limits: 1.20 GHz - 2.40 GHz
available frequency steps: 2.40 GHz, 2.40 GHz, 2.27 GHz, 2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz, 1.47 GHz, 1.33 GHz, 1.20 GHz
available cpufreq governors: conservative, ondemand, userspace, powersave, performance
current policy: frequency should be within 1.20 GHz and 1.20 GHz.
current CPU frequency is 1.20 GHz.
cpufreq stats: 2.40 GHz:0.00%, 2.40 GHz:0.00%, 2.27 GHz:0.00%, 2.13 GHz:0.00%, 2.00 GHz:0.00%, 1.87 GHz:0.00%, 1.73 GHz:0.00%, 1.60 GHz:0.00%, 1.47 GHz:0.00%, 1.33 GHz:0.00%, 1.20 GHz:100.00%
So, assuming the current policy and cpufreq stats, it's impossible to scale up over 1.20 GHz.
Even if I force with cpufreq-set.
By curiosity, I took the kernel sources from Lucid and I compiled it. (I never had this problem with Lucid, so let's try and see what happen.) :
Linux BlackBeast-T410 2.6.32-24-generic #8 SMP Tue Oct 12 02:09:23 CEST 2010 x86_64 GNU/Linux
cpufreq-info shows me for all virtual cores :
analyzing CPU 3:
The governor "ondemand" may decide which speed to use
within this range.
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 3
maximum transition latency: 10.0 us.
hardware limits: 1.20 GHz - 2.40 GHz
available frequency steps: 2.40 GHz, 2.40 GHz, 2.27 GHz, 2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz, 1.47 GHz, 1.33 GHz, 1.20 GHz
available cpufreq governors: conservative, userspace, powersave, ondemand, performance
current policy: frequency should be within 1.20 GHz and 2.40 GHz.
current CPU frequency is 1.20 GHz.
cpufreq stats: 2.40 GHz:3.26%, 2.40 GHz:0.02%, 2.27 GHz:0.05%, 2.13 GHz:0.05%, 2.00 GHz:0.03%, 1.87 GHz:0.02%, 1.73 GHz:0.03%, 1.60 GHz:0.01%, 1.47 GHz:0.03%, 1.33 GHz:0.03%, 1.20 GHz:96.48% (235)
It's far better than with the Maverick Kernel ! current policy and cpufreq stats return coherent values. The CPU scales up to 2.40 GHz with high CPU usage. So, cpufreq utils work, but not acpi-cpufreq kernel module ?!
There is also something weird... it can be reproduced with the 2 kernels :
when "/etc/init. d/cpufrequtils start" is invoked, I have got :
* CPUFreq Utilities: Setting ondemand CPUFreq governor... * CPU0... ...