top | item 23473848

Way to keep your cool running a Raspberry Pi 4 (2019)

137 points| guiambros | 5 years ago |jeffgeerling.com | reply

99 comments

order
[+] tosh|5 years ago|reply
vertical orientation also seems to impact temperature

""" Simply moving Raspberry Pi 4 into a vertical orientation has an immediate impact: the SoC idles around 2°C lower than the previous best and heats a lot more slowly – allowing it to run the synthetic workload for longer without throttling and maintain a dramatically improved average clock speed.

There are several factors at work: having the components oriented vertically improves convection, allowing the surrounding air to draw the heat away more quickly, while lifting the rear of the board from a heat-insulating desk surface dramatically increases the available surface area for cooling. """

https://www.raspberrypi.org/blog/thermal-testing-raspberry-p...

[+] jacquesm|5 years ago|reply
It's not that simple in the general case though: putting a board vertical will cause the top of the board to be hotter than the bottom, possibly a lot hotter than it would have been in a horizontal position even if the average temperature of the board is a lower one!

Looking through a thermal imaging camera gives all kinds of interesting insights.

[+] sixothree|5 years ago|reply
This is a useful article. Thank you.
[+] rc4hobby|5 years ago|reply
Thermal engineer here. There absolutely no need to use fan cooling, humongous heatsinks or harebrained temperature controller schemes to cool the raspberry pi 4.

All that is needed is a small heatsink to slightly decrease the thermal resistance to ambient air, to stay below the thermal throttling threshold.

Anything more complicated than that is a pointless exercise in pointlessness.

[+] LeoPanthera|5 years ago|reply
Did you read the article? He tested a heatsink. I'll quote the relevant part.

> Heatsinks will generally shave 5-10°C off the highest temperatures you encounter, which is significant, but you still need to have air moving across the heatsink for it to do anything. This means either a fully open Pi (great for testing or tinkering, not so great for a semi-permanent installation), a well-ventilated case (with slots or holes in the bottom and top to allow natural convection), or a fan. So not a bad choice, and they're so cheap you should probably stick them on any Pi you can... but heatsinks alone won't solve Pi cooling problems.

[+] vardump|5 years ago|reply
The article is dated November 22, 2019, which makes me wonder whether it was before the Raspberry Pi 4 firmware upgrade that reduced heat generation quite a bit.

My two 4GB Raspberry Pi 4s have had no thermal issues. Running the same measurement script now, will report back the results.

Edit: Ok, done with the tests. Both RPi4s are bare and should be running exactly the same versions.

RPi4 #1 started at 51C, peak 79C, no throttling at any point. Ambient temperature 24C.

RPi4 #2 started at 54C, peak 82C at which point it started to throttle. Ambient temperature 27C.

[+] hajile|5 years ago|reply
TDP theoretically scales linearly with clockspeed and scales worse in reality. Most Pi 4 can sustain 2.1GHz CPU and 650-750MHz GPU. That's a 30-35% increase in clockspeeds. If I'm taxing the system, even a FLIRC case will throttle on my pi. ICE tower has done an amazing job and the sound isn't noticeable on 3.3 volts. In fact, you can simply unplug the fan and passively cool (though it'll throttle after a few minutes at peak clocks).

I used the pi for dev work for a few weeks as an experiment. Overclocking is the single-biggest improvement you can make. An overclock combined with the IPC improvements from a 64-bit OS, and load improvements via SSD, the system is probably 75% faster which is a huge deal at that performance level (the difference between extremely frustrating and just mildly annoying at times).

[+] Havoc|5 years ago|reply
Yeah that's consistent with what I saw when I looked at the upgrade. Two degrees gained or so.

I gather the main temp gain isn't the CPU though but rather on the USB charging circuitry.

[+] herogreen|5 years ago|reply
Nice test, it could be cool to have people repeating it to see how much the "silicon lotery" influences the temps.

Also there a few model of cases on ebay/aliexpress that would be interesting to test such as https://m.aliexpress.com/item/4000509636456.html (with a heatsink added)

[+] reitanqild|5 years ago|reply
Anyone has links to similar articles with regards to either

- SD card reliability

- techniques for reliably using what we have

?

Given that people are using these for all kinds of stuff there must be some advanced techniques being used (or some basic I have missed).

[+] _gfrc|5 years ago|reply
I've been running a raspberry 3 with a cheap sandisk sd card for years now without any SD Card issues. It runs a DNS based ad-blocker and a vpn.

I am logging everything to ram instead of writing it to the card and that's about it. I never encountered any issue with SD Card reliability, despite me sometimes just pulling the plug instead of properly shutting it down.

Here is a simple guide: https://raspberrypi.stackexchange.com/a/62536

I do have a couple of other raspberries for other uses (e.g. a small rc car) which are also running on their first SD card. Might be just luck, but I do think that it's not necessary to go to extreme lengths to have them run reliably.

[+] arm|5 years ago|reply
Regarding microSD card reliability, one option would be to simply forego the microSD card completely and boot the Raspberry Pi 4 via an SSD connected to one of the Raspberry Pi’s USB 3.0 ports.

I was originally going to recommend checking out this¹ article for instructions on how to do it. However, much of the instructions are no longer valid (as of two weeks ago!) since they assume that the Raspberry Pi 4 doesn’t natively support booting from USB, which finally isn’t the case (although only if you use the current beta bootloader²). I’d still recommend reading it though, as it also mentions known working 2.5″ SATA to USB 3.0, M.2 NVMe to USB 3.0, M.2 SATA to USB 3.0, and mSATA to USB 3.0 adapters. In addition, I’d recommend checking out this³ article with some recommended SSDs; in particular, this⁴ 120 GB Kingston A400 SATA 3 2.5” Solid State Drive coupled with this⁵ StarTech 2.5″ SATA to USB 3.0 Adapter, which also has the added bonus of giving you far better speeds than a microSD card would! As the author of that article mentions:

The Kingston A400 drive performs really well in the Raspberry Pi Storage Benchmarks⁶. It’s a great drive and is cheaper than many mid-range MicroSD cards.

The 2.5″ SATA to USB adapter above allows us to do this. There is no power adapter needed as SSDs are low power and are powered by the Pi through USB.

――――――

¹ — https://jamesachambers.com/raspberry-pi-4-usb-boot-config-gu...

² — https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb

³ — https://jamesachambers.com/raspberry-pi-storage-benchmarks-2...

⁴ — https://www.amazon.com/dp/B01N6JQS8C/

⁵ — https://www.amazon.com/dp/B00HJZJI84/

⁶ — https://storage.jamesachambers.com/

[+] _trampeltier|5 years ago|reply
For 2-3 years I had a tower (1m height) with 8 RP3s, 4 thinker boards and about 12 Orange Pis (different models). I did run different BOINC projects on it. So the load was 100% 24/7.

The whole time I had 1 or 2 broken SD cards. Temperature was never an issue.

I put on all SBCs just a passive heatsink (about 30x30x20mm). I installed packs with 4 boards vertical. On the bottom I had 2 large fans for all the SBCs. (sorry no picture)

[+] meego|5 years ago|reply
A good approach used in industrial/embedded applications: use a read-only root volume. If you don't write to your SD, you don't wear it out and have no risk of file system corruption either. It's quite a lot of work though, since most packages assume they're installed on a writeable file system.

Debian wiki has a (pretty bad and outdated) page on the subject https://wiki.debian.org/ReadonlyRoot#Enable_readonly_root

[+] glenneroo|5 years ago|reply
At the bottom of this thread the official response from SanDisk support is that all cards except the High Endurance are not supported for Raspberry/Linux:

https://www.raspberrypi.org/forums/viewtopic.php?p=1158010

I've been using them for the last couple years and haven't had any dead Pis, unlike what happened with a couple other "regular" sd cards.

[+] roland35|5 years ago|reply
My original pi has been corrupting SD cards all the time, especially now that I am running pi hole on it which seems to need more RAM than is available on my old board.
[+] Havoc|5 years ago|reply
Either network boot or SSD boot. The SD cards do eventually die. I've lost two already
[+] m463|5 years ago|reply
The reasonable answer seems to be the flirc case.

No noise, no moving parts, excellent cooling.

[+] digitalsushi|5 years ago|reply
Up here in NH it gets a little chilly in the barn loft where the server rack is hiding inside an old credenza. A chicken egg incubator on a heat switch keeps the spinny disks on the NAS above 35F and it turns off at 45F. It only turned on a few times during the coldest days last year. I dont know for a fact whether spinny disks like to be above freezing but anecdotally someone said yes and it was 12 bucks to set it up.
[+] walshemj|5 years ago|reply
When we had some very cold winters in the UK I had to wait for the room to warm up for our 8 inch floppys to work in our DEC PDP.
[+] ohazi|5 years ago|reply
The flirc case is a giant heat capacitor, not a heat sink.

Notice that it has the only temperature curve where the temperature does not go back to baseline after the stress test. It needs a lot longer to get to equilibrium, and the final temperature is almost certainly hotter than what's shown on the graph.

[+] GloriousKoji|5 years ago|reply
There's still a good increase in surface area for convection it's definitely a heatsink. The graph does a poor job showing this but the start and stop idle time is 5 minutes. That's a good amount of time for temperature to settle.
[+] smichel17|5 years ago|reply
I own one. To some extent you're right. My pi runs mpd and pi-hole at all times and under that relatively low load, the case is constantly warm to the touch. But it has enough surface area that I've never been worried about overheating. Refer to TFA -- a tiny little heat sink on the cpu was all that was need to keep from throttling.

I don't have the hardware to give a proper surface temp reading. I can measure the pi's reported temperature / test for throttling under extended load later, but for now: I stuck an "instant"-read thermometer intended for cooking into one of the usb ports, which was the hottest place I could find on the case. It measures 36.1°, compared to an ambient temp of 23.4°.

[+] rcarmo|5 years ago|reply
I have been running one for a few months, and it does get consistently warm, but does not throttle the CPU (at least for my workloads). Will be setting up a second one as a “workstation” soon.
[+] elcomet|5 years ago|reply
You can additionally stick a cpu heatsink on it (like prop. 2 in this article). This will help dissipate heat from the case.

But overall, this case is still better than bare pi, or regular plastic case (the heat capacitor has much larger surface than the cpu of the pi).

[+] dannyw|5 years ago|reply
exactly. For passive heat sinks, you need big surface areas. The FLIR case doesn’t do that and is arguably one of the worst options esp considering its price.
[+] no_gravity|5 years ago|reply
My PI is too cool. It freezes.

I have playing with a PI Zero W over the last weeks. At first everything worked as expected.

But now it developed some strange "hangings" I cannot explain. It kinda randomly freezes in time for a few minutes every now and then.

Sometimes it takes several minutes to ssh into it. Sometimes, the terminal just freezes for several minutes.

Neither top nor iostat seem to show any elevated activity during these periods. Since they hang throughout the freeze, its a bit hard to say though.

The strangest thing: Pings to the PI always come back fast. So its probably not that the hardware really freezes completely.

[+] mszcz|5 years ago|reply
Have you tried replacing the SD card with a fresh one with a fresh install and checking if this still occurs? I've had a somewhat similar problem and it turned out to be a dying SD card.
[+] dsun179|5 years ago|reply
I had a similar problem. For me the reason was that I used a cheap charger with too less power.
[+] jstanley|5 years ago|reply
I've had this sort of issue caused by bad SD cards. Basically anything that touches the disk can block for several seconds sometimes.
[+] xrmagnum|5 years ago|reply
Is your hostname added to /etc/hosts?
[+] bmurphy1976|5 years ago|reply
Sounds like a crappy sdcard to me. I tossed an older one out recently that would randomly stall during io operations.
[+] tleb_|5 years ago|reply
Could strace on the ssh server help you? You would know if it's a disk issue.
[+] tjpnz|5 years ago|reply
I'm using mine primarily as a streaming device. In my experience a heatsink is more than good enough. Depending on your workload all a fan will do is make a bunch of noise and spread dust around.
[+] umaar|5 years ago|reply
I've been doing voice + screencasting on a modern MacBook Pro. The fans seem to intermittently kick at full blast while connected to a 4k external display, or sometimes it's just Dropbox doing CPU intensive things. Either way it's disruptive to the sound, and background noise removal in post doesn't completely fix it.

I've never had to think about heat dissipation so much. Might try a laptop cooling pad.

[+] roland35|5 years ago|reply
This is timely for me, I finally am upgrading my original A to a 4! Another advantage of the Flirc case is that it hides the blinking lights which are so tempting for my toddler!
[+] ChuckMcM|5 years ago|reply
I have a bunch of the FLIRC cases for my various versions. They are relatively expensive for what they are but they work well.
[+] mseidl|5 years ago|reply
I've had a little fan on an old rpi3 I had and it was annoyingly loud.
[+] dannyw|5 years ago|reply
Why do people use cases on a Pi? I’ve never ever used a case.

My Pis are always out of the way and in a shelf somewhere, untouched until I make modifications to the setup, in which case the case is often coming off anyway.

[+] ohazi|5 years ago|reply
There are "hardware project RPis" where you're always futzing with the gpio header, and then there are "appliance RPis" that live on top of the router they're connected to via a six inch Ethernet patch cable. A case is common for the appliances.
[+] Arnt|5 years ago|reply
So the cleaners will touch the case, not the electronics. Also, the bare board doesn't offer a convenient way to fix the Pi to a wall IIRC.
[+] rcarmo|5 years ago|reply
Dust and protection from casual accidents. Having a naked board on any kind of desk is just asking for trouble...
[+] the_af|5 years ago|reply
I'm gonna go ahead and be the shallow person here: I kinda like the look of the cases. It's a shame the official case has the worst heat problem, because it looks the coolest to me.