Wednesday, 14 April 2010

Finally got my Karmic box working properly!

Ever since I upgraded to Karmic (9.10) my machine has performed like a dog - well as far as keyboard and mouse input went - the mouse would linger and the system would loose my keystrokes. I tried a bunch of things to no avail....

Then I was perusing the web - frustrated by my sluggish machine - I'd read about cpu frequency scaling and wondering if this might be an issue. Well it turned out to be the root of my problem! Though in general I think more modern CPU should operate fine with cpu scaling enabled but these old AMD Opteron CPU's don't seem to be up to it so I've disabled it and the machine behaves a lot better.

To fix it - firstly I installed the cpufrequtils:
sudo aptitude install cpufrequtils
Checked the current state of my machine (You can also do it using any of: cat /proc/cpuinfo, sudo dmidecode -t processor, lshw -C processor):
sudo aptitude install cpufreq-info
 My machine was in 'ondemand' mode - I changed it to 'performance' mode - for each of my two processors:
sudo cpufreq-set -c 0 -g performance
sudo cpufreq-set -c 1 -g performance
This is actually setting the following /sys entries: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

There a few more things you can do with the cpufreq utils.

No comments:

Post a Comment