Raspberry Pi is a great hardware in itself, it’s really awesome to see such a small hardware do so many things with next to nothing power consumption. Although it is enough for most of the purposes, sometimes you just might want it to perform a little better for it to be able to handle your school project. In such cases, you should consider overclocking your raspberry pi.
So, what is overclocking?
Overclocking is a way for you to get some more output from the existing hardware by tinkering with few of it’s parameters. Although it is conventionally done to more mainstream processors, it does come with a few warnings and in extreme cases hardware risk. So, we do recommend making sure about your device and hard before you begin.
Is overclocking Raspberry Pi safe?
In most cases, yes.
If done cautiously, your Raspberry Pi will be able to out-perform most of the normal devices out there, as well as, it is equipped with certain security features which will allow it to slow down in case of overheating. Also, to make sure you don’t have any stability issues, add a stronger power supply after you overclock your device.
P.S. It’s great to add a Heat Sink with a small fan to your device to help maintain it’s temperature.
Prerequisites
- A good power supply (official Raspberry Pi PSU recommended)
- Active cooling (heatsinks and/or a fan)
- Recent OS (Raspberry Pi OS or another compatible Linux distribution)
- Backup your data (in case of corruption)
Step 1: Checking Current Clock Speeds
Before overclocking, check your current CPU frequency:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Step 2: Open the Config file
Raspberry Pi uses a config file instead of BIOS like in our normal personal computer motherboards. This file is located is located in /boot/ . You can edit the file using the following command:
sudo nano /boot/config.txt
Step 3: Making modifications
Raspberry Pi 5:
over_voltage=6
arm_freq=3000
gpu_freq=1000
Raspberry Pi 4:
over_voltage=6
arm_freq=2000
gpu_freq=750
Raspberry Pi 3:
over_voltage=4
arm_freq=1400
gpu_freq=500
Raspberry Pi 2:
over_voltage=2
arm_freq=1100
Save and close the file using CTRL+X, Y, ENTER and reboot the ddevice using the following command:
sudo reboot
Step 4: Verifying Overclock
After rebooting, verify the new frequency:
vcgencmd measure_clock arm
If it’s working, it should show the new overclocked frequency.
For Raspberry Pi 5 there is another thing you can check:
vcgencmd measure_clock v3d
Step 5: Monitoring Temperatures
Overclocking generates heat, so monitor temperatures:
vcgencmd measure_temp
If temperatures exceed 80°C, consider better cooling.
Step 6: Stress Testing
Run a stress test to check stability:
sudo apt install stress
stress -c 4 -t 300
If the Pi crashes, lower the overclock values.
Step 7: Undoing Overclock
If the system becomes unstable, boot into recovery mode (hold Shift while booting) and remove the overclock settings from /boot/config.txt.
Warnings
- Overclocking voids warranties.
- It can cause data corruption—use a high-quality SD card.
- Excessive overclocking can damage hardware.
To learn more about overclocking limitation and possible values, read here. It comprises all possible range and values possible for each and every Pi model along with other possible modification in the config file.