• Skip to primary navigation
  • Skip to main content
  • Skip to footer

Miguel Ángel Antolín Bermúdez

Personal portfolio & Blog

  • Home
  • Blog & posts
You are here: Home / Engineering / how to / Raspberry Pi 4 Overclocked!

how to, Raspberry Pi / 20th August 2019

Raspberry Pi 4 Overclocked!

We’ve got a new Raspberry Pi model on the market and now it’s time to play with it. Let’s see the capabilities of the Raspberry Pi 4B overclocked.

I’ve also overclocked the Raspberry Pi 3B+ model, please take a look at the post.

We just have to edit the file with the following line on a new 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, and v3d_freq together. On Pi 3/Pi Zero /Pi Zero W core_freq defaults to 400 and h264_freq, isp_freqand v3d_freqdefault to 300; on the Pi 4B the core_freq, h264_freq, isp_freq, and v3d_freq default value is set to 500.
  • 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, and there is no effect on the SDRAM on the Pi 4B.
  •  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 the gpu_freq setting, and v3d_freq, frequency of the 3D block in MHz, and independent override of the gpu_freq setting.
  • sdram_freq modifies the frequency of the SDRAM in MHz. The default value is 500 on the Pi3B+, and 3200 on the Pi 4B.
  • 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 if over_voltage_* is also set.
  • arm_freq sets the frequency of the ARM CPU in MHz. Default value is1400 for the Pi 3B+ and 1500 for the Pi 4B.
  • 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 Pi 4B 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 Pi 4B overclock are these highlighted in yellow.

Tests have been run with the sysbench utility.

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)

[Default values]
gpu_mem=512
gpu_freq=500
sdram_freq=3200
arm_freq=1500

62.8396s

10000

251.3217

24.92ms
25.13ms
63.18ms

2500.0000

6.78

62.8304

0.01

[Overclocked]
gpu_mem=512
gpu_freq=600
sdram_freq=3200
arm_freq=1600
over_voltage=8

64.7285s

10000

258.8771

23.39ms
25.89ms
63.38ms
2500.0000
3.54
64.7193
0.00
[Overclocked]
gpu_mem=512
gpu_freq=600
sdram_freq=3200
arm_freq=1650
over_voltage=8

58.2113s

10000

232.7852

22.18ms
23.28ms
57.64ms
2500.0000
3.67
58.1963
0.01
[Overclocked]
gpu_mem=512
gpu_freq=600
sdram_freq=3200
arm_freq=1700
over_voltage=8

90.8423s

10000

363.3011

22.01ms
36.33ms
32950.23ms
2500.0000
4.30
90.8253
0.01
[Overclocked]
gpu_mem=512
gpu_freq=600
sdram_freq=3200
arm_freq=1750
over_voltage=8

90.6037s

10000

362.3534

20.92ms
36.24ms
29024.70ms
2500.0000
2.74
95.5884
0.01

Filed Under: how to, Raspberry Pi Tagged With: 4B, cpu, overclocking, Raspberry Pi

Footer

Find me at

  • GitHub
  • LinkedIn

Recent Posts

  • Passwordless auth through SSH
  • Raspberry Pi 4 Overclocked!
  • Raspberry 3B+ Overclock
  • Google assistant on Raspberry pi
  • Block ads anywhere with Pi-hole and a VPN

© 2020 · Made with ❤ in Seville