Heatsinks are cool (sometimes)

Hi,
I’ve got my hands on a Raspberry Pi 4 (8GB version) and a Suptronic x872 SSD NVMe shield for the system boot. Now with this setup there was a question how to cool it all down. I like Pimoroni heatsink case since it is just a big chunk of metal that tries to look like a case :laughing: - good for passive cooling.

It is not exactly tied to EOS-ARM but I hope someone find this interesting. :slightly_smiling_face:

In normal operation I saw that everyone was using the case in a horizontal position (CPU facing up). But it would mean that the SSD below the Pi would be sitting directly on the table. So I made a little testing of how much different orientation of the case changed effectiveness of the cooling.
Sadly, this ssd shield doesn’t allow me to read ssh’s temperature (I am not sure right now if it is only my incompetence or some missing feature).

So, these positions were tested:
position

This is a small stress test script I used:

click to show
#!/usr/bin/env python3

import subprocess
import time

FILE_NAME           = "stress_result"
FILE_TMP_STORAGE    = "/tmp/"
SEPARATOR           = ";"
NEWLINE             = "\n"

LOOP_SLEEP          = 1.0       # delay between each loop iterations

COUNT_PRE_STRESS    = 600       # number of loops before stress is applied
COUNT_STRESS        = 2100
COUNT_POST_STRESS   = 900       # cooldown after stress cycles

iterator    = 0
# header, [args], [string parse], multiplier, print format
commands    = [
                ['datetime', ['date', '--iso-8601=ns'], [None, -1], None, ''],
                ['temperature_core_[°C]', ['vcgencmd', 'measure_temp'], [5, -3], 1.0 , '.1f'],
                ['clock_arm_[GHz]', ['vcgencmd', 'measure_clock', 'arm'], [14, -1], 0.000000001 , '.3f'],
                ['clock_core_[GHz]', ['vcgencmd', 'measure_clock', 'core'], [13, -1], 0.000000001 , '.3f'],
                ['throttled', ['vcgencmd', 'get_throttled'], [10, -1], None , '']
              ]

header = 'iterator'
header += SEPARATOR + 'phase'
for command in commands:
    header += SEPARATOR + command[0]
header += NEWLINE

with open(FILE_TMP_STORAGE + FILE_NAME, "w") as f:
    f.write(header)


# phase: 0==pre, 1==stress, 2==post
phase = 0
phase_last = 0

iterator = 0
while(phase < 3):

    line = str(iterator)

    phase_last = phase  # copy phase of the last cycle

    if(iterator >= COUNT_PRE_STRESS + COUNT_STRESS + COUNT_POST_STRESS):
        phase = 3
    elif(iterator >= COUNT_PRE_STRESS + COUNT_STRESS):
        phase = 2
    elif(iterator >= COUNT_PRE_STRESS):
        phase = 1
    else:
        phase = 0
    line += SEPARATOR + str(phase)

    if(phase == 1 and phase_last == 0):
        pipe = subprocess.Popen(['stress-ng', '-c4', '-l100'], shell=False)
    elif(phase == 2 and phase_last == 1):
        pipe.terminate()

    for command in commands:
        proc = subprocess.run(command[1], capture_output=True, text=True)
        result = proc.stdout
        result = result[command[2][0]:command[2][1]]
        if(command[3] != None):
            result = float(result) * command[3]

        line += SEPARATOR + '{1:{0}}'.format(command[4], result)

    line += NEWLINE
    with open(FILE_TMP_STORAGE + FILE_NAME, "a") as f:
        f.write(line)

    iterator += 1
    time.sleep(LOOP_SLEEP)

    print('iter: ' + str(iterator) + '\tphase: ' + str(phase))

print('done')

And this is the result - first it is idle (less then 5% load) then 100% load on all CPUs and then again idle. This is a plot from running averages (10 points).
temperature_graph
Ambient temperature was 21.5-22.0°C. The runs were in order 1, 2 and 3 so it is not like the device could be influenced by previous runs (except for the on_side_3 which obvously didn’t cool down enough from the previous run when idle - the script could use longer idle periods but I didn’t want to wait).

Truth be told I didn’t expect such difference between horizontal and on_side run since when the case is on the side the ribs of the heatsink are not in direction of a natural air flow.
I also didn’t see any case of thermal throttling but with some dust collection it will probably change.

9 Likes

Thanks, these results are really interesting. Can I ask what temp range you’re aiming for? I ask because I’ve got a pi 4 8GB running ubuntu-server 20.04 and hosting jellyfin, nextcloud, and various functions over ssh. It’s mounted in the Argon One case that includes a fan, and it generally runs around 40C, with the fan set to kick in when it goes over 50C (though that only happens rarely, like when 2+ people are watching something on jellyfin that requires transcoding, etc). At what temperature would you start to worry that it’s getting too hot?

I have that same case, but with two little fans on it…
Have yet to give it a test though…

Are those two cables on the gpio needed for that nvme-shield??

Below melting point of Pi. :grinning: Here I know that even with 100% load on all cores it will be around 60°C which has enough safety gap from 80°C which is thermal limit for throttling. For this kind of device I think passive cooling is the only way (0 noise, 0 additional power for fans).
Some people are too much concerned that higher temperature will “wear out” the cpu. I believe that it will sooner have dead by obsolence than a thermal damage.

Consumer electronics (with CE certification) are usually rated +80°C so 81°C will make me slightly concern. :rofl:
As long as there is no throttling I don’t think there is a need for a concern. It’s just a toy anyways.
There is one big benefit of having no fan. It can’t suddenly overheat due to blocked rottor of the fan. Collecting dust will increase temperature slowly as well as weather change (ambient).

Sadly yes this shied has a problem that it gets power only from USB 3 on the PI. When I measured voltage on the shield is was only 4.8V when idle (no disk I/O) with 5.2V on PI GPIO. This caused major problem during boot and it was not possible to boot from ssd. Booting from SD card was possible and the ssd was mounted as well. There was just too big power draw when it all started which caused ssd to brown-out.
Also when running without those cables I saw some strange re-mounting of sda in journalctl every minute or so.

I also found out that there is SATA variant of this shield (sadly after I already purchased this one - I don’t know how much better it is). It is cheaper, ssd-SATA are usually cheaper and have lower power needs. Also the biggest bottleneck is USB3 speed which can’t utilise full potential of NVMe drives but SATA drives are closer to it.

2 Likes

You do not have to worry. The CPU on the Pi is designed to thermal throttle itself at 100c to try and cool it down. It will shut itself down if the temp reaches 110c to prevent damage.

The above being said, thank you very much for the information. It gives me information on another case option if I need one.

3 Likes

fan

Looks silly, but works well.

See here for temp.

Pudge

4 Likes

That is new to me. Always thought it was at 80°C.

Yes, silly. :rofl: :helicopter:

But I see you are also overclocking it. I have no need for that, yet.

1 Like

The heatsink on the N2 is also pretty impressive - even under full load it rarely goes above 60C (fan doesn’t trip until 80C), and with the fan set to a lower trigger point of 45C it easily keeps it there without running constantly.

I guess that’s down to the larger surface area for convection… :thinking:

Pretty sure that can’t be done… :stuck_out_tongue_winking_eye:

2 Likes

My guess is that the area between the board and the heatsink has some significant cooling effect. The top heatsink sits only on processor, RAM and USB chip. Everywhere else there is about 5 mm gap from the board which allows hot air to flow in a natural convection. Also when the board is on the side the convection effect allso apply to the side of the board oposite from the processor.

solid state harddrive? :thinking:

Just a small update.
I am running the Pi “on side” 5th day with a video conversion (script here).
So far it looks stable and the temperature does not go above 65°C.

Htop is showing constant CPU load between 95-100% on all cores with an astonishing conversion speed 1 min of the movie per 10 minutes real time. :sweat_smile:
It’s so slow but the Pi is running 24/7 anyway mostly doing nothing so a little excercise doesn’t hurt, right? Funny thing is that I calculated overal power consumption to convert one movie and it’s not too different compared to my desktop PC, it only takes longer.

3 Likes