Steve's Blog

Xen, CPUFreq and the Core i5 CPU

A while ago I updated my main fileserver (which was an old P4!) to a new Intel Core i5 CPU & associated hardware. I’ve managed to do some more tweaking today and found some very interesting things.

All Intel i5 CPUs (and probably the i3 & i7 as well) have this feature called Intel Turbo Boost. In short, what this does is to make your CPU run faster when it needs to - and as long as it doesn’t get too hot etc. This gives a nice performance boost without having to overclock the CPU all the time to squeeze out a little more performance.

There are however a few things you need to configure correctly to make sure Turbo Boost works on your system:

  1. Configure cpuspeed to use the acpi_cpufreq module. Once this is done, have a look at scaling_available_frequencies. You should see something like this:
1
2
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
3326000 3325000 3192000 3059000 2926000 2793000 2660000 2527000 2394000 1197000

This tells us we can scale between 1197Mhz and 3325Mhz. Note the entry for 3326Mhz. This is the way linux shows us the Intel Turbo Boost functionality.

  1. It’s probably wise to use the ondemand governer for cpufreq. This will allow the system to ramp up its clock speed as required, then back it off automatically when things are a bit quieter.

  2. Check to see that loads in Xen DomUs are correctly ramping up the CPU speed. To do this, I used this command:

1
watch "xm list; echo; cat /proc/cpuinfo | grep MHz"

This will show what DomU systems are running every 2 seconds, as well as the frequency that each core is running at. My system is currently an i5 661 (2 cores, 4 threads), so I see:

1
2
3
4
cpu MHz         : 1197.000
cpu MHz         : 1197.000
cpu MHz         : 3325.082
cpu MHz         : 3325.082

The last 2 entries are the hyperthreads for core0 and core1 respectively. You will note that the frequency of the extra threads do not change - but the cores will. When you do some activity in a DomU, you should see one or both of the cores clock up as required.

I love technology when it works properly :)

This Is True, Really!

It’s over 10 years since This Is True, Really! (TITR) was around on an Internet Radio site called NetRadio. It was well worth it - and I still get a good chuckle when I happen to come across some old shows on my network. Sadly, I could find no trace of TITR or what happens to Scot Combs and Tony Vircenis - A long lost jockey is out there but all I can remember is that technically how you write his name is “You can’t get potatoe salad a la carte”.

If you want to share in on the laughs, I’ve put up the small archive I have on soundcloud

Telstra (Australia) vs Telecom NZ

Its interesting to note that in a recent letter to shareholders, Telecom NZ have almost confirmed that the company will be splitting into two distinct companies. One to manage the fibre optic infrastructure and another to offer retail/wholesale services. This is something that the Australian Government have been trying to force Telstra (however unsuccessfully) for quite a long time.

From the letter to shareholders:

Over the last couple of years a Government policy has evolved that is known as Ultra Fast Broadband. The aim of this policy is to invest $1.5 billion of public funds in extending the amount of fibre optic cables used to carry broadband in New Zealand.

… one of the requirements of the tender process is that the companies that build the fibre optic infrastructure do not also offer services to end users, such as retail and business customers.

This has made me wonder a number of things. Why didn’t the NBN have a similar clause? Why have Telstra been so reluctant to do this?

For those that are interested, the full letter is available here.