Overclocking Raspberry Pi: How to Do It and What You Need to Know
Whatsapp Pinterest
Advertisement

The Raspberry Pi 3 is a great little computer, far more powerful than the models before it. But did you know you can squeeze even more power out of it? Here’s how to overclock your Raspberry Pi, and push it further than you ever imagined!

Why Overclock Your Raspberry Pi?

A standard Raspberry Pi 3 boasts a 1.2GHz 64-bit quad-core CPU, 1GB RAM, along with a Broadcom VideoCore IV GPU as part of the Broadcom System on a Chip (SoC) BCM2837.

Overlocking the CPU will result in increasing the default Raspberry Pi clock speed from 1.2GHz up to 1.5GHz, depending upon your cooling solution (such as a heat sink). Note that because the Raspberry Pi uses a SoC, you’ll need to adjust RAM to accommodate overclocking.

What’s the point of overclocking a Raspberry Pi? Well, it’s simple: you want to get the most out of it. Several popular tools will work better than intended with overclocking.

Retro gaming: If you’ve been struggling with running Sony PlayStation 1, Sega Dreamcast, or Nintendo N64 games on RetroPie, RecalBox, or whatever retro gaming solution you’ve chosen Retro Gaming on the Raspberry Pi: Everything You Need to Know Retro Gaming on the Raspberry Pi: Everything You Need to Know The Raspberry Pi has plenty of uses, but perhaps the most fun is playing classic video games. Here's everything you need to know about retro gaming on your Raspberry Pi. Read More , overclocking can help considerably.

Kodi: Performance issues with streaming video in Kodi can be overcome thanks to overclocking your Raspberry Pi. If you’re also using a VPN, higher clock speed will help here too.

Exagear: Trying to run Windows software on your Raspberry Pi? Even with the right preparation, overclocking can help here.

Desktop: Raspberry Pi 3 can be used as a standard desktop. Who wouldn’t want a bit of additional performance, courtesy of an overclocked processor?

Overclocking a Raspberry Pi 3 is a practical response to some of its shortcomings (albeit ones that are dealt with in the more recent Raspberry Pi 3 B+ How to Decide If You Need the New Raspberry Pi 3 B+ Model How to Decide If You Need the New Raspberry Pi 3 B+ Model The new Raspberry Pi 3 B+ has been released. How much does it cost, what hard specification does it have, and will it improve your existing projects? We've got answers. Read More ).

Overclocking Is Always Risky

While overclocking Raspberry Pi is simple to achieve, it is not without risk.

overclock raspberry pi what why and how

Heat is generated: Cooling solutions are required 5 Cool Ways to Keep Your Overclocked Raspberry Pi 3 Chilled 5 Cool Ways to Keep Your Overclocked Raspberry Pi 3 Chilled With all the cool stuff you can do with a Raspberry Pi, it's no surprise they can get a bit hot. Here are the best ways to cool them down. Read More if you plan to overclock your Pi. Heat is bad for computer systems, as it slows processing, which in turn generates heat.

Component failure: Increased heat can also result in the failure of components.

Data corruption: Using increased clock speeds often results in corrupted data. If you’re using a hard disk drive for your Pi’s operating system, this shouldn’t be a massive issue. However, if your Raspberry Pi relies on a microSD card (most do), then you may find flash media is increasingly unreliable.

Reliable power supply: You should already be using a good quality power supply for your Raspberry Pi. Anything less than the recommended 2.5amp power adaptor is unsuitable for overclocking. Data corruption will quickly occur with a low power supply.

At one stage, overclocking your Raspberry Pi would void the warranty. However, as of September 19, 2012, this is not the case, thanks to built-in overclocking tools; there is one setting that will affect the device warranty, however, which we’ll cover below.

How to Overclock a Raspberry Pi 3

Still want to overclock your Raspberry Pi? Although you can overclock on other distros, we’ll be looking at the process on Raspbian Stretch. Begin by running a full update and upgrade:

sudo apt update && sudo apt install upgrade

With that done, install the sysbench tool:

sudo apt install sysbench

You’ll need this later for checking how overclocking has improved performance. For now, however, run sysbench to get a baseline:

sysbench --test=cpu --cpu-max-prime=2000 --num-threads=4 run

Make a note of the results, or append a destination file to output the results to for comparison later.

sysbench --test=cpu --cpu-max-prime=2000 --num-threads=4 run > benchmark-before.txt

Next, you’ll need to edit the config.txt file. You’ll find this in the boot directory, which is best accessed via the terminal.

Begin by switching to the root directory

cd /

Next, change directory to boot.

cd boot

Confirm you’re in the right location by listing the contents.

ls

You should spot config.txt. At this point it is worth nothing that the boot directory is the only portion of your Raspberry Pi’s operating system that is accessible from Windows. We’ll come back to that later. For now, just make a copy of the file:

sudo cp config.txt config.old

You should now have two config files. The first is the one you can edit, config.txt; the second is your backup, config.old.

To edit config.txt:

sudo nano config.txt

Here, you’ll find a list of settings, in the format “name=value”. Look for “overclock”; you should find a line that reads “#Uncomment to overclock the arm.” Remove the hashtag from the first line beneath, #arm_freq=800.

To overclock your Raspberry Pi 3 significantly, you’ll need to enter values for the following four conditions:

  1. arm_freq
  2. core_freq
  3. sdram_freq
  4. over_voltage

For the Raspberry Pi 3, it’s most common to overclock with the following:

arm_freq=1300
core_freq=500
sdram_freq=500
over_voltage=600

These settings are the maximum stable clock speed you’re likely to get. Lower options are available, but somewhat pointless. However, as noted elsewhere, the software you’re running will determine whether or not you’re happy with the overclocked speed.

Check Overclock Performance With sysbench

Now the system is overclocked, you should run the sysbench tool again:

sysbench --test=cpu --cpu-max-prime=2000 --num-threads=4 run > benchmark-after.txt

Comparing the difference here should highlight the performance improvements you can expect with your Raspberry Pi overclocked.

overclock raspberry pi what why and how

Once you’ve discovered which maximum clock speed you’re happy with, you can carry on as normal… or you might prefer to use the force_turbo setting to keep the Pi running at maximum speeds. While you’re free to do this, it is the one factor in Raspberry Pi overclocking that definitely will void your warranty.

How to Recover a Failed Overclock

If you’ve rebooted your Raspberry Pi with overclocked settings and found that it won’t run, or it crashes, freezes, of behaves in some other undesirable manner, you’ll need to undo your changes. This is easily done:

  • Power off the Raspberry Pi.
  • Remove the microSD card.
  • Insert the card into your PC’s card reader.
  • Rename \boot\config.old to config.txt.
  • Open the \boot\config.txt file.
  • Input the correct clock speed, and save.
  • Safely remove the microSD card, replace in your Pi, and boot.

Everything should now be back to normal.

Can Other Raspberry Pi Models Be Overclocked?

Overclocking is an option for older versions of the Raspberry Pi. As ever, take precautions to ensure the device is efficiently cooled. Use our Raspberry Pi comparison The Raspberry Pi Board Guide: Zero vs. Model A and B The Raspberry Pi Board Guide: Zero vs. Model A and B With so many different Raspberry Pi models, how do you know which one to buy? Our ultimate guide tells you everything you need to know! Read More to check the correct clock speed of your model, and be sure not to increase the speed by more than 10 percent.

To overclock older Raspberry Pis, everything you need is built into the Raspbian operating system. Begin by opening the configuration tool, either on the desktop (Preferences > Raspberry Pi Configuration), or from the command line.

sudo raspi-config

After noting the warning, choose Overclock.

overclock raspberry pi what why and how

In the next menu, you’ll find a list of options. The currently-selected overclocking option will be None, but you’ll have a selection of up to five alternatives, depending on your Raspberry Pi model. Pictured below is the overclock screen for the Raspberry Pi 2.

overclock raspberry pi what why and how

While on other devices, overclocking is a case of making a small increase and testing, with preset options, this isn’t really necessary. All you need to do is select the overclocked preset you want to use, then select OK to apply it. However, if you’re trying non-standard overclocking that isn’t available via a preset option (using the config.txt file, as explained earlier), then make small, careful adjustments and test the results.

Note that overclocking can also affect the performance of connected hardware, such as the PiTFT display from Adafruit. As such, you’ll need to take additional precautions (such as manually adjusting the config.txt file after setting a new clock speed in the menu).

Overlocking is never an exact science. As such, you should spend some time assessing its impact on your Raspberry Pi and any regularly-used software. Our general guide to PC overclocking The Beginner's Guide to CPU Overclocking The Beginner's Guide to CPU Overclocking Overclocking is an art, but it's not magic. Here we share how overclocking works, complete with a step-by-step guide to safely get a performance boost out of your CPU. Read More provides plenty of background information.

Explore more about: Overclocking, Raspberry Pi.

Enjoyed this article? Stay informed by joining our newsletter!

Enter your Email

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. sds
    October 23, 2018 at 12:45 pm

    Overvoltage 600? You mean 6.