Multicore CPU Freqiency scaling broken

Bug #462284 reported by hal
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

When I run 4 cpu intensive process on Quad Core on the 9.10-rc amd64 i found that the performance is decreased compared to 9.10 alpha3. After some investigation I found that the frequency scaling is not working correctly. Often for some cores low frequency is reported and "top" reports load of 0% for this core, and on one of the other cores 2 processes are run.

This is not ovserved on 9.10 aplha3

Tags: kj-expired
Changed in ubuntu:
status: New → Confirmed
Revision history for this message
rumen (rumen) wrote :

I am affected too.. after an upgrade from 9.04. Please see the attachment.
Have a look at the execution times of the same code (left terminal). It varies between 39, 45 and 57 seconds. The most often it is 57s. before the upgrade it was always 39. Please note the process distribution: CPU0 is almost not loaded. Also note the frequency on (bottom right) it is 2G not 2.66.

Something else: When I change the freq by hand to "2.66" or "Performance" or what ever it returns back to "Ondemand" within several seconds.

It is annoying... I do not know if it is the kernel or something else...

Revision history for this message
rumen (rumen) wrote :

UPDATE: It does not return to "ondemand". It i was my fault. I did not know that changing "Ondemand" to something else affects only the motored CPU in the CPUapplet. And I was playing with changing the monitored CPUs and that led me to this wrong conclusion.

However the main problem is still here.

Revision history for this message
rumen (rumen) wrote :

Hi all I have found the problem. The value of
/sys/devices/system/cpu/cpu*/cpufreq/ondemand/sampling_rate
is too low it is set to 10000 which is the min value. In 8.10 and 8.04 this value is 80000.
I have changed it to 40000 something in the middle and the problem is gone.

I have changed the /etc/init.d/ondemand adding:
--------------------
for CPU_SRATE in /sys/devices/system/cpu/cpu*/cpufreq/ondemand/sampling_rate
 do
  [ -f $CPU_SRATE ] || continue
  echo -n 40000 > $CPU_SRATE
 done
------------------

I do not know where the values are set by default maybe in the kernel itself?!
I would like to address the developers and ask them to set this variable to a more reasonable value. It should not be hard to fix if you know where to look.
10x!

Revision history for this message
hal (hal-bg) wrote :

10x :) Works for me too.
Let's hope the official fix will be released soon.

Revision history for this message
Victor Vargas (kamus) wrote :

could you check (if is possible) in latest version included in Karmic if this issue is still happening? Thanks in advance.

affects: ubuntu → linux (Ubuntu)
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
hal (hal-bg) wrote :

I have commented the lines in /etc/init.d/ondemand as posted above updated the system and reboot.
Unfortunately the problem is still here.
See the screenshot.

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Incomplete and has not had any updated comments for quite some time. As a result this bug is being closed. Please reopen if this is still an issue in the current Ubuntu development release http://cdimage.ubuntu.com/daily-live/current/ . Also, please be sure to provide any requested information that may have been missing. To reopen the bug, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-expired
Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.