How to Overclock a Raspberry Pi 4 for Improved Performance

The Raspberry Pi 4 single-board computer is essential for users who love to tinker on a budget. While performance is good enough for most everyday tasks, you can improve it by overclocking Raspberry Pi’s quad-core processor. Here’s how.

Why Overclock Your Raspberry Pi?

Despite its diminutive size and price, the Raspberry Pi 4 is surprisingly powerful. You canprepare your Raspberry Pi as a web serverand use it toself-host alternatives to proprietary services, you canbuild a Raspberry Pi retro gaming console, or you could use it as anetwork monitoring tool.

None of these uses is likely to make the Raspberry Pi 4 sweat unduly, and you probably won’t see your CPU usage creep into the red. But there are some tasks which will put a significant strain on the Raspberry Pi 4’s quad-core Cortex-A72. These include transcoding video forstreaming through Jellyfin on your Raspberry Pi, running alarge language model on your Pi, and object and facial recognition if you’re runningImmich as a replacement for Google Photos.

4

In these cases, you will notice tasks taking longer than you might like, or your streaming video will stutter as the Pi transcodes an ancient AVI file on the fly.

By overclocking your Raspberry Pi, you can increase the maximum CPU speed of 1.8 GHz to around 2.1 GHz, increasing efficiency, and reducing the amount of time it takes to get things done.

speedometer with raspberry on a black background

Overclocking Is Always Risky

The clock speed of your Raspberry Pi is set to a maximum of 1.8 GHz for a reason. At that speed, it’s stable and unlikely to crash. Higher speeds also generate more heat, so if you’re going to overclock your Raspberry Pi 4, make sure that your setup has sufficient cooling. In addition to fans, there are severalRaspberry Pi caseswhich offer both active and passive cooling.

Overclocking a Raspberry Pi 4 also means that it will draw more power. Add in the extra electricity needed to run the fans, and it becomes absolutely essential to make sure you have a reliableRaspberry Pi power supply.

raspberry pi 4b in a silver metal case

How to Overclock a Raspberry Pi 4

With those caveats out of the way, overclocking a Raspberry Pi 4 is actually fair simple, although you will need to use the terminal to do it.

Open a terminal by clicking the icon in the top menu bar or throughMenu > Accessories > Terminal, then update and upgrade your system:

overclock settings for Raspberry Pi 4

You’ll want to see your Raspberry Pi performance before and after your Pi 4 overclocking, and to do this you need a benchmark tool. Install Sysbench with:

The following command will test performance by computing prime numbers. The output won’t give you a clock speed, but will show you the number of events per second. Make a note of the figure for later.

sysbench output for overclocked Raspberry Pi

The parameters you need to change are located in/boot/config.txt. Make a copy of this file in case you need to revert later:

Now use the nano text editor to open the file:

Scroll down to the section marked#uncomment to overclock the arm. 700 MHz is the default, and delete the line below it:#arm_freq=800, and paste in the following to increase performance:

We found 2100 to be about the limit: our Pi 4 grew warm, and simply wouldn’t boot at 2200 MHz.

If you want your overclock to apply all the time, rather than just when your Raspberry Pi is under load, you may add an extra line:

You should be aware, however, that this will void your warranty.

Save and exit nano withCtrl + OthenCtrl + X, then reboot the Pi:

When your Pi powers up again, run Sysbench again, and note an increase in the number of events per second.

What to Do if Your Raspberry Pi 4 Overclock Fails

Your overclock might not work, and ours failed when we attempted to push it up to 2.2 GHz. This isn’t the end of the world, and it won’t damage your Pi.

To restore your Pi to working order, remove the SD card or SSD, and plug it into your desktop PC. Navigate to/boot/, and editconfig.txtto a lower number.

Alternatively, if you’ve now decided to keep your Raspberry Pi 4 with its standard clock speed, simply renameconfig.txt.baktoconfig.txt.

Create Some Awesome Projects With Your Overclocked Pi 4!

With the extra power at your disposal, you’re less limited in the uses to which it’s possible to put your Raspberry Pi 4. There are thousands of projects which would benefit from your extra clock cycles, so put them to good use!

Want to try something different with your Raspberry Pi? Here are some unique Raspberry Pi projects that may have never crossed your mind.

Who asked for these upgrades?

Your phone is a better editor than you give it credit for.

If an AI can roast you, it can also prep you for emergencies.

So much time invested, and for what?

I gripped my chair the entire time—and then kept thinking about it when the screen turned off.

Technology Explained

PC & Mobile