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 cpufrequtilsChecked 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-infoMy 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 performanceThis 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.