Overclocking & Optimising the Raspberry PI

My Raspberry PI

Out the box the Raspberry PI comes with a ARM1176JZFS Core (armv6 with hard float aka armhf arch) running at 700 Mhz as part of the Broadcom SoC. Additionally the memory frequency is also limited. In recent firmwares however… tinkerers have had the ability to “overclock” the Raspberry PI to squeeze some extra juice out of it. Mine’s currently running at 1Ghz at a solid 48C temperature when under load. So the first question that springs to mind is… why doesn’t everyone overclock their Raspberry PI? Well… there have been (well founded) reports of SD card corruption, heat/power issues and instability. The idea of this post is to show the user how to safety squeeze every last bit, cycle and IOP out of their PI safely’ish and without being an astrophysicist. Read on for the know-how.

My Raspberry PI that was the victim of this how to is a Rev A, Model B, 256MB RAM model. I.e. the first Raspberry PI model publicly available. However, this should work on any PI.

If you flashed the standard Rasbian image on your Raspberry PI then it would have shipped with a tool named raspi-config. This tool basically gives an interactive interface to configuring lots of tweaks on your Raspberry PI without any manual intervention or guess work. It also restricts the limits of what you can do and warns you if you’re being stupid. So all-in-all…quite useful.

Raspi-Config

The features we will be focusing on are memory_split and overclock… If you don’t see any of these options, then update raspi-config. Strictly speaking there are a lot of Overclocking/Tweak options, but most are not what we need right now / will be superseded by the our approach.

Memory Split

Firstly, make your decision, is this a headless server? will you be needing the GPU? if the answer to those questions is Yes then No, then you can free up a lot of memory by adjusting the split. I’ve set my split at 16MB to GPU and the rest to CPU, this is MORE than enough for your GPU to function and display headed now and again, but isn’t enough if you’re for example… decoding 1080p H264 high-profile.

Select your RAM Split

Overclock Options

The next thing we are gonna do is Overclock, upon entering this menu you’ll get a few warnings about reducing the life of your PI and SD Card corruption. Both are incredibly true, however, my PI cost £25 and is a hobbyist device, if it breaks after 2 years, i’ll buy a new one (if i’m even still using it by then). The SD Card, my advice, its hit and miss, i’ve tested many cards on the PI, the higher end ones seem to be most affected by the over clock, whichever option you select is up to you, but i’d go for the max setting and scale back if you need 🙂

Select your Overclock preset.

Any setting you select in raspi-config is basically editing flat files on your SD Card that the firmware looks for when booting. So the final step is… REBOOT! You should then be inside your newly optimised PI.

Power Hunger

The PI needs the power it says on the tin, excessive use of the network+usb/cpu will reveal if you’re under-powering your PI, you will notice significant performance degradation when under stress and system instability. My advice, spend £4 on a decent power adaptor. It makes a difference.

Final Safety Measure

You see in the picture of my PI, i’m using a heatsink on the SoC, this was “donated” kindly by a friend (cheers Klaus), I suspect, knowing him, its from amazon.co.uk and probably cost about £2.50, I stand corrected, £2.73 for 2 from our amazon store :). I advise getting one, very easy to stick on, and even aesthetically pleasing. Its worth profiling your temperature after overclocking to judge stability. You can do this on any raspbian image by typing

root@raspberrypi:/home/pi# /opt/vc/bin/vcgencmd measure_temp
temp=49.2'C

Anything above 50 i’d say is not great.

Anyway, i’ll try to update this little guide as I play around more with my PI, in the mean time, feel free to hit me up on twitter @italoarmstrong with any queries / suggestions.

 

 

Leave a Reply