How to overclock Raspberry Pi 4
Retailing for around $ 40 (VND 920,000), the Raspberry Pi 4 has a lot to offer, but you can get more out of this powerful mono PC by overclocking it.
Overclocking the CPU and GPU can often deliver noticeable performance boost, especially useful if you perform resource-intensive tasks, such as gaming, streaming high-resolution media content or using it. Raspberry Pi is a mini laptop.
- 26 awesome apps from the tiny Raspberry Pi computer
Everything you need to know about overclocking
Overclocking means that the CPU and memory settings run at speeds above their official clock speed.
Despite the performance benefits, many people avoid overclocking for fear of voiding the warranty. Unlike some organizations, the Raspberry Pi Foundation supports overclocking, so you can follow this guide without having to worry about warranty issues. However, you should also carefully review the Raspberry Pi Foundation Foundation's guidelines to make sure you don't accidentally void the warranty!
Things to prepare
To complete this tutorial, you will need:
- Raspberry Pi 4
- Keyboard and how to attach this keyboard to a Raspberry Pi
- Screen
- Micro HDMI cable
- SD card is compatible with Raspberry Pi model. You'll wipe this SD card, so make sure it doesn't contain anything you want to keep.
- A good quality power supply. If you are going to overclock a Raspberry Pi, then you should choose the official Raspberry Pi Universal Power Supply. By using official power, you can be confident that your Raspberry Pi has enough power to run at overclocking speed.
- A way to cool the Raspberry Pi. When the processor is working 'heavier', it gets hotter. Without reducing the heat generated by the Raspberry Pi, you will not benefit from overclocking. There are many different options for cooling your Raspberry Pi, including a heatsink, stand-alone fan or fan case, or you may even want to venture out and create your own water cooling setup!
Install the official Raspberry Pi operating system
For the purpose of this tutorial, we will write the Raspbian operating system to the SD card, using Etcher. If you don't have Etcher installed, you can download it for free from Balena's website.
- Visit the Raspbian website and download the latest version.
- Insert an SD card into a laptop or computer.
- Launch the Etcher application.
- In Etcher, click Select image and then select the Raspbian system image you have just downloaded.
- Click Select target and select the target boot media, in this case SD card.
Now, Etcher will flash the Raspbian system image to the SD card.
Boot into Raspbian
When Raspbian is installed:
- Remove the SD card from the computer and insert the card into the Raspberry Pi.
- Attach the monitor to the Raspberry Pi with the micro HDMI cable.
- Attach the keyboard to the Raspberry Pi device.
- Plug the Raspberry Pi into a power source.
- Raspbian will now start automatically.
Consider updating to the latest release
If you want to experience the best overclocking capabilities, then you'll need to upgrade Raspbian to the latest experimental firmware build. Note that test releases are likely to contain bugs, errors, and many other issues, so you should not use them in production environments.
Reference: How to update your Raspberry Pi to the latest Raspbian operating system to learn how.
Benchmark Raspberry Pi
Before you overclock your device, you might want to record some information about your device's current performance for later comparisons!
There are many benchmarking tools on the market, but the article will use Sysbench.
Alternatively, you can skip this step completely and move straight to overclocking.
In the Raspbian toolbar, select the Terminal icon. Enter the following command in Terminal:
sudo apt-get install sysbench
Once Sysbench is installed, you can get basic information about the Raspberry Pi's performance, by entering the following command in Terminal:
sysbench --test=cpu --cpu-max-prime=2000 --num-threads=4 run > pre-benchmark.txt
This command will create a 'pre-benchmark' text file containing information about the current performance of the Raspberry Pi.
CPU overclocking
When overclocking the CPU, you will increase the clock speed of the central processor, helping to increase performance. Most of the workload on the Raspberry Pi is affected by the clock speed instead of the graphics processing unit. After overclocking your CPU, you'll experience noticeable performance improvements, no matter how you use your Raspberry Pi.
To edit the config.txt file of the Raspberry Pi, run the following Terminal command:
sudo nano /boot/config.txt
Now, the config.txt file will open in Raspbian's Nano text editor with root privileges.
You can overclock the CPU by making some changes to these core configuration settings:
1. Scroll to the bottom of the file and find the section marked [pi4].
2. On a new line immediately below [pi4] , add the following information:
over_voltage=2arm_freq=1750
Alternatively, if you have the latest test software installed, you can try these values instead:
over_voltage=6arm_freq=2147
3. Save changes with Ctrl
+ O
and exit the file with the shortcut Ctrl
+ X
You need to restart the Raspberry Pi 4 before these new configuration settings are loaded, so run the following command in the Terminal window:
sudo reboot
If the overclocking is successful, then Raspbian will start using the new configuration settings.
Check the result!
If you've taken the time to create a report before overclocking, now is the time to create a second report and compare the results.
Launch a Terminal window by clicking the small icon on the toolbar, then run the following command:
sysbench --test=cpu --cpu-max-prime=2000 --num-threads=4 run > post-benchmark.txt
This will create a 'post-benchmark' report. To view the reports, select the file icon in the Raspbian toolbar and open the 'pre-benchmark' and 'post-benchmark' files. You can now compare these reports to see exactly how much CPU increase has been achieved!
Overclock the GPU
Now, let's switch to GPU:
1. Open Terminal and run the following command:
sudo nano /boot/config.txt
2. Scroll to the [pi4] section and add the following to the new line:
gpu_freq=600
If you have the latest test firmware, you can try increasing this number to 750.
gpu_freq=750
3. If you overclock both CPU and GPU, look for the line over_voltage=2
and change it to:
over_voltage=6
4. Save changes using the shortcut Ctrl
+ O
and exit the Nano application with the shortcut Ctrl
+ X
Now, all you need to do is restart the Raspberry Pi and the changes will take effect!
You should read it
- How to overclock Raspberry Pi 3
- Everything you need to know about overclocking your Raspberry Pi 5
- 11 Raspberry Pi acceleration tricks
- How to add an ADC to Raspberry Pi: What you need to know
- Raspberry Pi Zero vs Model A and B, how are they different?
- What is the Raspberry Pi and how is the Raspberry Pi used?
- How to start Raspberry Pi 3 from USB
- Why should people try Raspberry Pi 4?
- Learn Pi Imager, How to Use Raspberry Pi Imager
- How to use Raspberry Pi Imager to install Raspberry Pi OS
- 5 ways to make good use of Raspberry Pi 4
- 7 best Raspberry Pi 4 cases