It’s known we’re not able to overclock our raspberries from the raspi-config tool since the 3B model. However, we have another option to set the Raspberry 3B+ overclock, modify some params on the /boot/config.txt file. So, let’s do it!
We just have to edit the file with the following line on a terminal window,
sudo nano /boot/config.txt
and near the bottom of the file we’ll add the following lines:
gpu_freq=500
sdram_freq=550
arm_freq=1550
over_voltage=8
force_turbo=1
Explaining these lines
- gpu_freq sets
core_freq
,h264_freq
,isp_freq
, andv3d_freq
together. On Pi 3/Pi Zero /Pi Zero Wcore_freq
defaults to400
andh264_freq
,isp_freq
andv3d_freq
default to300
. - core_freq is the frequency of the GPU processor core in MHz. In other words, It has an impact on CPU performance because it drives the L2 cache and memory bus. Default value is
400
for the Pi 3 and Pi Zero and Pi Zero W. Note that the L2 cache benefits only the Pi Zero/Pi Zero W and Pi 1, but there is a small benefit for SDRAM on the Pi 2/Pi 3. - h264_freq adjusts the frequency of the hardware video block in MHz. Individual override of the
gpu_freq
setting, isp_freq sets the frequency of the image sensor pipeline block in MHz. Individual override of thegpu_freq
setting, and v3d_freq, frequency of the 3D block in MHz, and independent override of thegpu_freq
setting. - sdram_freq modifies the frequency of the SDRAM in MHz. The default value is
500
on the Pi3B+. - over_voltage regulates the CPU/GPU core voltage. [-16,8] equates to [0.8V,1.4V] with 0.025V steps. In other words, specifying -16 will give 0.8V as the GPU/core voltage, and specifying 8 will give 1.4V. Values above 6 are only allowed when
force_turbo
is specified: this sets the warranty bit ifover_voltage_*
is also set. - arm_freq sets the frequency of the ARM CPU in MHz. Default value is
1400
for the Pi 3B+. - force_turbo param forces turbo mode frequencies even when the ARM cores are not busy. Switch this on may set the warranty bit if
over_voltage_*
is also configured.You can get more info about those settings at Raspberry Pi Docs.
Making some tests
Changing those parameters, we’ve got our Raspberry 3B+ overclock ready! Above all that system changes, I’ve tried to do some memory and system benchmarks, to set an appropriated values and try avoid data loss. Pick the right settings.
Some great settings for Raspberry 3B+ overclock are these highlighted in yellow.
Tests have been run with the sysbench utility.
sysbench --test=memory --cpu-max-prime=20000 --num-threads=8 run
sysbench --test=cpu --cpu-max-prime=20000 --num-threads=4 run
/boot/config.txt | Test execution summary: | |||||
---|---|---|---|---|---|---|
Time |
Events |
Time of event execution |
Per-request (min/avg/max) |
Thread events (avg/stddev) |
Threads execution time (avg/stddev) |
|
hdmi_force_hotplug=1 gpu_mem=256 gpu_freq=500 sdram_freq=550 arm_freq=1550 over_voltage=8 |
71.7988s | 10000 | 287.1419 | 28.56ms 28.71ms 47.52ms |
2500.0000 14.95 |
71.7855 0.01 |
gpu_mem=256 gpu_freq=450 sdram_freq=550 arm_freq=1500 over_voltage=8 |
74.4044s | 10000 | 297.5806 | 29.5ms 29.76ms 46.05ms |
2500.0000 13.13 |
74.3951 0.01 |
over_voltage=8 gpu_mem=256 initial_turbo=60 sdram_freq=650 arm_freq=1550 gpu_freq=550 sdram_freq=550 |
91.9731s | 10000 | 367.8263 | 28.56ms 36.78ms 20126.82ms |
2500.0000 12.27 |
91.9566 0.01 |
I’ve also overclocked the Raspberry Pi 4B model, please take a look at the post.