PDA

View Full Version : cpuspeed and dual core processors



mcwill
5th May 2006, 07:18 PM
[Ignore this as it doesn't fully fix the problem - see my second posting for a better solution]

After installing FC5 my X2 based system I couldn't help thinking that the system as a whole was sluggish. After installing the "CPU Frequency Scaling Monitor" applet I noticed that the system was running at 1GHz at times when I would have expected it to be running at full speed, so I did a little investigating...

By default cpuspeed will increase the cpu freq when cpu load reaches 75% and jump immediately to max freq when cpu load reaches 90%. This sounds reasonable but monitoring cpu load I noticed that it commonly would stick at 50% and remain clocked down at 1GHz, for example when installing updates through yum. This happens I imagine when the task load is being performed by 1 core only.

So, the cpuspeed thresholds needed to be dramatically changed to detect when 1 cpu was loaded and adjust the freq accordingly...

I selected a cpu load of 45% would result in max cpu frequency immediately and a load of 30% would cause a step up in frequency. (In my case 1Ghz -> 1.8Ghz -> 2.0Ghz).

The cpu thresholds are configured as % idle so I modified /etc/cpuspeed to inlcude the following line...



# Add your favorite options here
OPTS="$OPTS -p 55 70"


The result is a system that feels much more responsive yet still scales down freq when it is not required.

Hope this helps,
Iain

nnylip
7th May 2006, 07:23 PM
I have a Shuttle sn21g5 with amd x2 4200. cat /proc/cpuinfo showed my cores were running at 1ghz. I disabled cpuspeed in system>services and now it runs at 2.2ghz. - Lou

mcwill
7th May 2006, 07:53 PM
Yes, disabling speed throttling will result in your processor running at full speed all the time. However with summer and hotter days on the horizon I'm quite keen to get the throttling operating correctly. After all there is no need for the cpu to scream along at max speed if it has nothing to do.

However at the moment I'm not sure I have fixed the problem, I'm still seeing occasions when 1 cpu is fully loaded and another fully idle leading to a low clock frequency. I now wonder if it's the two cpuspeed daemons fighting over what the clock speed should be.

Looks like more checking is required.

... Ok after a fair amount of forum searching it appears this has already come up before with the suggested solution being best described here:-

Ondemand (http://www.twibble.org/Articles/amd-x2-powernow)

So now every time I run glxgears the cpu freq immediatly hits max and more importantly stays there.