• 10
    Nov - 2019

    Raspberry Pi
    6 min | 2629

    #Raspberry Pi 4B: Sometimes it's cool to be hot -or warm, to be exact ;)-

    Raspberry Pi | 6 min | 2629


    heatsink
    ice tower cooler
    n-queens problem
    performance
    raspberry pi 4b
    temperature test

    This article is the last in a series of three articles that evaluates the performance of the Raspberry Pi 4B. This time the performance of Raspbian with standard kernel (4.19.y) will be evaluated with and without active cooling using two types of heatsinks. The other articles in the series are the following:

    1. The first article is about comparing the Raspberry Pi 4B and 3B+ performances:
    2. The second article compares the Raspberry Pi 4B running standard and Preempt-RT kernels.

    There are some published experiments that compare the performance of the Raspberry Pi against temperature. Kunbus published some time ago for the RevPi Core 3 (based on Raspberry Pi 3B) the following text:

    There should be no cutbacks of compute power at ambient temperatures under 20°C. At 25°C ambient temperature 3 cores may run with full clock speed while with 4 cores the clock frequency is lowered from 1.2 to 1.1 GHz after 10 to 20 minutes of full stress. At 40°C ambient temperature 4 cores under full stress will still work with 1 GHz while stressing just 1 core results in no down clocking. At 50°C ambient temperature 4 fully stressed cores are running at average 0.7 GHz, having short down clockings to 0.6 GHz and short up clockings to 0.9 GHz. ,1 core under full stress does result in no down clocking. At 65°C ambient temperature and either 4 or 1 core under full stress results in an “emergency mode” with just 0.4 GHz, after longer periods even 0.3 GHz. (valid for RevPi Core 3) (source).

    There are also some articles reporting that the Raspberry Pi 4B needs a heatsink to get its maximal performance, and thus, the ICE-Tower Cooling with Fan appears in the market.

    But, do we need the ICE-Tower Cooling with Fan? In this article, I will present you some performance results!

    Hardware & Software

    In this series of articles, the following software and hardware are used:

    Raspberry Pi
    • Rasbperry PI 4B
    E-ink Screen
    • Aluminum Heatsink Kit
    ICE-Tower
    • ICE-Tower CPU Cooling Fan
    Raspbian Buster
    • Rasbpian Buster
    GitHub
    • N-Queens Problem Benchmark
    GitHub
    • RT-Tools-RPi
    GitHub
    • rPI-Tests

    ICE Tower Cooler

    The ICE tower cooler kit has everything you need to start cooling the Raspberry Pi (see Fig. 1). The package also includes a screwdriver to fix the heatsink to the Raspberry Pi and a mounting guide with links to tutorial videos in YouTube. As you can see, this version has two sets of brackets: one for the new and another for the old Raspberry Pi model. You get also some extra screws in case you lose some of them. Note that I said "this version", because last week I bought a new kit, and it came with one set of brackets compatible with both Raspberry Pi versions.

    rpi_ice_tower-min.png
    Fig 1: ICE tower cooler kit

    Performance Test

    For performance tests, there are multiple benchmark software but I used my personal one: a multi-thread N-queens problem solver written in Python! Thus, I tested the performance of the Raspberry Pi 4B while running Python and solving mathematical problems!

    FYI: The N-Queens Problem/Puzzle is a well-known problem that consists of placing N chess queens on an N × N chessboard so that no two queens attack each other.

    I used Visual Studio Code (VSCode) and the Remote-SSH extension (read the VSCode part of this article) to connect to the Raspberry Pi and install Python3-pip, git and the Python3 needed extension as:

    pi@raspberry:~# sudo apt-get install python3-pip git
    pi@raspberry:~# pip3 install tqdm

    Then, the performance of the Raspberry Pi 4B resolving the N-queens problem (multi/single-thread) can be measured using the following code:

    pi@raspberry:~# git clone https://github.com/lemariva/N-Queens-Problem.git
    pi@raspberry:~# cd N-Queens-Problem
    # multi-thread (N=12, Threads=4, Repetition=100)
    pi@raspberry:~/N-Queens-Problem# python3 queenpool_multithread.py multithread_output.csv 12 4 100
    [...]
    
    # single-thread (N=12, Threads=1, Repetition=50)
    pi@raspberry:~/N-Queens-Problem# python3 queenpool_multithread.py singlethread_output.csv 12 1 50
    [...]

    A comparison of the Raspberry Pi performance using the aluminum or the ICE-tower (active -fan on- / passive -fan off-) heatsink solving N-Queens problems in multi/singe thread mode can be found in Fig. 3 (a/b/c) and 4 (a/b/c). The sub-figures 'a' show the performance using the aluminum heatsink, while 'b' (passive) and 'c' (active) using the ICE-Tower cooler.

    Multi-thread Configuration 4B Standard Kernel Fig. 3a: Raspberry Pi 4B
    Multi-thread Configuration
    Aluminum Heatsink
    Multi-thread Configuration 4B Standard Kernel Fig. 3b: Raspberry Pi 4B
    Multi-thread Configuration
    ICE-Tower Cooler (Passive)
    Multi-thread Configuration 4B Standard Kernel Fig. 3c: Raspberry Pi 4B
    Multi-thread Configuration
    ICE-Tower Cooler (Active)
    Single-thread Configuration 4B Standard Kernel]()| ![Single-thread Configuration 4B Standard Kernel Fig. 4a: Raspberry Pi 4B
    Single-thread Configuration
    Aluminum Heatsink
    Single-thread Configuration 4B Standard Kernel Fig. 4b: Raspberry Pi 4B
    Single-thread Configuration
    ICE-Tower Cooler (Passive)
    Single-thread Configuration 4B Standard Kernel Fig. 4c: Raspberry Pi 4B
    Single-thread Configuration
    ICE-Tower Cooler (Active)
    rPi 4B
    Aluminum Heatsink
    rPi 4B
    ICE-Tower Cooler
    (Passive)
    rPi 4B
    ICE-Tower Cooler
    (Active)
    Avg. Multi-Thread Solving Time 18.73s 18.14s 18.32s
    Multi-Thread Max. Temperature 79.42°C 61.42°C 41.19°C
    Avg. Single-Thread Solving Time 68.56s 67.14s 69.22s
    Single-Thread Max. Temperature 60.67°C 49.09°C 36.74°C

    When I finished these tests, I was a bit surprised. Lowering the temperature of the Raspberry Pi using the ICE-Tower cooler with the fan on didn't improve the performance of the Raspberry Pi solving the N-Queens problems. While the CPU/GPU temperature improvement between using the aluminum heatsink or the ICE-tower cooler with fan on is visible, the performance has deteriorated. This cannot only be seen in the multi-threaded configuration, but also in the single-threaded configuration (see the numerical values in the tables). The best performance was obtained using the ICE tower cooler but without the fan on (passive): the temperature remained below 62°C and the overall performance improved, which resulted in the best of these tests.

    Two explanations for this come to mind:

    • The fan generates interferences in the voltage that affects the CPU performance (low voltage/current should not be a problem; the power supply provides 5.1V/2.5A).
    • The SoC needs a certain minimum temperature to obtain best results (less likely).
    Another good point!
    The new kernel (4.19.80) improved the results obtained with the previous kernel 4.19.57/59.

    Thus, to check the above hypotheses, I prepared three different test scenarios:

    • The fan connected to an external 5V power supply;
    • A 4700uF electrolytic capacitor (yes, I know, big!) connected directly to the fan pins and a gel ice pack over the heatsink to reduce the temperature a bit more;
    • A 4700uF electrolytic capacitor connected directly to the fan pins and an airflow reduction of the fan, so that the CPU temperature increases over 38°C.
    Multi-thread Configuration 4B Standard Kernel Fig. 5a: Raspberry Pi 4B
    Multi-thread Configuration
    ICE-Tower Cooler (Active)
    Ext. Power Supply
    Multi-thread Configuration 4B Standard Kernel Fig. 5b: Raspberry Pi 4B
    Multi-thread Configuration
    ICE-Tower Cooler (Active)
    Capacitor & Gel Ice Pack
    Multi-thread Configuration 4B Standard Kernel Fig. 5c: Raspberry Pi 4B
    Multi-thread Configuration
    ICE-Tower Cooler (Active)
    Capacitor & Airflow Reduction
    rPi 4B
    ICE-Tower Cooler (Active)
    Ext. Power Supply
    rPi 4B
    ICE-Tower Cooler (Active)
    Capacitor & Gel Ice Pack
    rPi 4B
    ICE-Tower Cooler (Active)
    Capacitor & Airflow Reduction
    Avg. Multi-Thread Solving Time 17.97s 18.27s 17.74s
    Multi-Thread Max. Temperature 39.46°C 37.48°C 43.41°C

    The external 5V power supply did improve the performance. Thus, the fan generates interferences on the voltage. But the best performance was obtained using the capacitor connected to the pins (voltage interferences were reduced) and with the CPU running over 38°C (the SoC needs some temperature to perform better!).

    capacitor-min.png
    Fig 6: ICE tower cooler with electrolytic capacitor between the connector pins

    EEPROM Firmware Update

    In mid-October, the Raspberry Pi foundation updated the EEPROM firmware of the Raspberry Pi 4B. The new firmware enables the power-saving functionality of the VL805 USB 3.0 controller and thus, the power draw is lowered by around 0.4W while the Raspberry Pi 4 is at idle, and around 0.3W under loaded conditions. According to Tomshardware, this means a 2.6°C drop at the SoC.

    To update the EEPROM firmware, you need to type the following:

    sudo apt update && sudo apt upgrade && sudo apt install rpi-eeprom rpi-eeprom-images 
    sudo rpi-eeprom-update

    The last command updates the EEPROM and the BOOTLOADER. If you want to switch to a beta firmware, edit this file:

    sudo nano /etc/default/rpi-eeprom-update

    Change the section of the file which reads:

    FIRMWARE_RELEASE_STATUS="critical"
    
    # To:
    
    FIRMWARE_RELEASE_STATUS="beta"

    and finally run:

    sudo rpi-eeprom-update

    I repeated the performance test using the ICE-Tower cooler with fan on and the 4700uF electrolytic capacitor between the connectors and the results are presented in Fig. 7.

    The new beta bootloader enables booting the Raspberry Pi 4B from the network. Follow the instructions on the Raspberry Pi Network Boot Tutorial to set up the server. This configuration page includes details on how the Raspberry Pi 4 boots from the network.
    rpi_4b_mt_ice_cooling_new_firmware.png
    Fig. 7: Raspberry Pi 4B
    Multi-thread Configuration
    ICE-Tower Cooler (Active)
    Capacitor & New Firmware


    rPi 4B
    ICE-Tower Cooler (Active)
    Capacitor & New Firmware
    Avg. Multi-Thread Solving Time 17.79 s
    Multi-Thread Max. Temperature 40.45 °C


    The results improved (Fig. 5a/b), but the best performance was obtained with the configuration from Fig. 5c.

    Conclusions

    This is the last article in the series about the performance of the Raspberry Pi 4B. In this case, I evaluated the ICE-Tower Cooler. I can almost say, that you don't need it to get better performances on the Raspberry Pi. However, if you plan to do some overclocking or you use a closed case, the large heatsink can be a great solution and a very quiet one.

    Obviously, lowering the CPU temperature extends its life (the SoC should support up to 135°C, but thermal stress is always a problem). But, for normal uses and not inside a closed case, the Raspberry Pi 4B works well with small heatsinks: naturally, very hot, but does not lose any performance!

    To conclude, if you are using a heatsink with a fan, be sure to connect an external electrolytic capacitor between the pins of the fan connector. It helps reduce interference. In addition, the CPU temperature should not be less than 38°C. It seems that the CPU performance is reduced under this temperature. This is less significant with the new EEPROM firmware, but the best performance was obtained with a capacitor connected to the fan pins and with the CPU running at temperatures above 38°C (see Fig. 5c). If you have a good explanation for this, leave a comment below!


    Comments

    Empty