marți, octombrie 22, 2019

Life of RaspberryPI: Boost the frequency of Raspberry PI 4


I have bought recently the new RaspberryPI 4 and built a custom case for it.


You can see that the fan is quite big, powered by a separate 12V power supply.
That means it will have no CPU temperature issues, in standby the temperature is about 33°C.

Then, why not take full advantage of the quad core 1.5GHz processor?
By default, the PI 4 runs at 600MHz for low power consumption.
So, to change this, just edit the config file:

root@raspberrypi:~# cd/boot
root@raspberrypi:~# vi config.txt

Uncomment the line for below parameter and set it to 1500 MHz:
arm_freq=1500

Under the [pi4] block, add a new line:
force_turbo=1

This will allow the PI to use a custom frequency, instead of the default 600MHz. (not 700MHz as it says in the config)

Save the file and reboot the PI.

After the system will be back online, you can check for the processor frequency:

 root@raspberrypi:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1500000

Or you can issue the lscpu command, the CPU frequency should be the same.

Also, the temperature didn't increase too much:

root@raspberrypi:~# /opt/vc/bin/vcgencmd measure_temp
temp=36.0'C

I also made a stress test, and with a huge load, the temperature was about 48-49 degrees Celsius. And I didn't even use a heatsink, although I am planning to add one.

root@raspberry:~# w
 11:58:43 up 16:25,  2 users,  load average: 11.43, 11.03, 10.18
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
pi       tty1     -                Fri10   25:41m  0.13s  0.09s -bash
pi       pts/0    192.168.100.13   11:14    2.00s 24.60s  0.07s sshd: pi [priv]
root@raspberry:~# /opt/vc/bin/vcgencmd measure_temp
temp=48.0'C
root@raspberry:~# lscpu | grep -i hz
CPU max MHz:         1500.0000
CPU min MHz:         1500.0000
root@raspberry:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1500000

So, with a good cooling system you can benefit from the maximum resources the PI has to offer.

Of course, you can also overclock the PI, using some other parameters such as over_voltage. I don't need to do it, not even experimentally, but maybe someone is willing to give it a try. I've heard around the web that the frequency can be set up to 1750MHz, or even 2000MHz, but I wouldn't do it.

Anyway, the PI 4 is just amazing and really worth the money. With 4GB of RAM and the quad core proc, it can be used as a mini home server for multiple purposes.

Have fun!

0 comentarii:

Trimiteți un comentariu