Overclocking the Raspberry Pi

Raspberry Pi Before and After Heatsinks

Raspberry Pi Before and After Heatsinks

I ordered some parts from my usual tech/electronics store and picked up some Zalman VGA RAM Heatsinks (ZM-RHS1) for my Raspberry Pi (rPi). Generally speaking, most of the things in my house are over clocked. Never to a crazy degree where I have to deal with water cooling, or even errors that happen every now and then. Usually just enough to run it a little bit faster than stock, and not really affecting the lifespan of the item. I figure that if I can cool it a little bit more, it’ll last longer, so if I push it harder, the net is zero. It doesn’t really work that way, but it’s close enough that it doesn’t matter cause the only thing I am messing with is stability and the tail end of the device life.

So as I have been playing around with WordPress on the rPi, I found that after I added some images and info to the device, that the Apache Bench (ab) scores were coming down. I started with something like 1.5 requests a second with vanilla WordPress, then after I loaded it up with the W3TC plugin, I hit 18 requests a second. After a couple of posts and maybe 10-20 images, I was down to 15 requests a second. Now, this may have to do with my SD card that I have in there, it’s not the best… But I wanted to see if I can speed it back up again by overclocking the rPi. You can check the temperature at which the CPU is running at by using this command:

watch -d cat /sys/class/thermal/thermal_zone0/temp

First thing I did was start monitoring the temperature of the device as I ran a longer ab test on it. Without any heatsinks it was at around 40 degrees. Using the newly available over clocking options available from the Foundation, I pushed it to the “Modest” setting. In the /boot/config.txt file, it’s:


At this setting, I was getting temperatures of around 46 or so when it is being hit by ab after a few minutes. I repeated this again with now with the heat sink attached and the temperature dropped back down to around 40. So with a heatsink on the CPU, you are looking at a zero temp difference. The ab benchmark returned closer to 17 requests a second at this setting. Also of note is that by default the rPi is set with the on demand governor, which means that it will only push the clock speed up if it needs to do so. You can check the speed at which the CPU is running by using this command:

watch -d cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

Upon reading that overvolting was supported on the site here, I decided to push it to the max 1Ghz with an overvolt of 6 at the “Turbo” setting. In the /boot/config.txt file, it’s:


A this setting, the temperatures at idle are at around 50. And I have seen it go up to 60 under heavy load. I probably stays at around 50 because of the overvolt and the additional frequency settings. With this configuration, ab is telling me that it is doing 22 requests a second. As this is as far as I would like to to push it, it will have to do for the time being until I figure out how to get 2 or three of these things running together to host a WordPress site. ;-)

One thing I would like to mention, from the resources that I see online, it seems the heat from the CPU is the least of the worries. The concern is more to do with the USB chip that is the hub for both the USB ports and the Ethernet port. It seems to run higher by around 10 degrees. It doesn’t have a thermal zone that we can watch/cat from, so readings had to be manual.

I think the next step for me to ensure that everything remains cool. Due to the way the air stagnates because of the Lego case I put together (and I will post about that soon). I think I need to open up the top and possibly have the rPi power the USB to drive a small fan to blow air to it.


Some additional links:


This site uses Akismet to reduce spam. Learn how your comment data is processed.