Adventures in Overclocking: Which Raspberry Pi 4 Flavor is Fastest?

There are three different versions of the Raspberry Pi 4 out on the market right now: the “normal” Pi 4 Model B, the Compute Module 4, and the just-released Raspberry Pi 400 computer-in-a-keyboard. They’re all riffing on the same tune, but there are enough differences among them that you might be richer for the choice.

The Pi 4B is easiest to integrate into projects, the CM4 is easiest to break out all the system’s features if you’re designing your own PCB, and the Pi 400 is seemingly aimed at the consumer market, but it has a dark secret: it’s an overclocking monster capable of running full-out at 2.15 GHz indefinitely in its stock configuration.

In retrospect, there were hints dropped everywhere. The system-on-a-chip that runs the show on the Model B is a Broadcom 2711ZPKFSB06B0T, while the SOC on the CM4 and Pi 400 is a 2711ZPKFSB06C0T. If you squint just right, you can make out the revision change from “B” to “C”. And in the CM4 datasheet, there’s a throwaway sentence about it running more efficiently than the Model B. And when I looked inside the Pi 400, there was this giant aluminum heat spreader attached to the SOC, presumably to keep it from overheating within the tight keyboard case. But there was one more clue: the Pi 400 comes clocked by default at 1.8 GHz, instead of 1.5 GHz for the other two, which are sold without a heat-sink.

Can the CM4 keep up with the Pi 400 with a little added aluminum? Will the newer siblings leave the Pi 4 Model B in the dust? Time to play a little overclocking!

Raspberry Overdrive

Overclocking a Raspberry Pi is basically painless. In most cases, it’s as simple as editing your /boot/config.txt file and typing in the desired maximum speed and CPU core voltage. If it doesn’t boot, you pick a lower CPU speed until you get something that works. But that doesn’t mean that you’re going to get the full performance bump — the main CPUs run alongside, or maybe underneath, the GPUs which run the ThreadX RTOS, and throttle the main CPUs when they get hot.

This thermal throttling means that you can run a Raspberry Pi as fast as you can shed the excess heat that it generates, below a ceiling of about 2.15 GHz. Not too shabby for a system that’s marketed as either 1.5 GHz or 1.8 GHz. But this is also the Pi’s Achilles’ heel; when our own Jonathan Bennett tried to use a Pi 4B as a desktop machine for a week, without a heatsink, he found it throttled occasionally. On all three of the test models here, throttling occurs around 82.5 °C.

Our test suite consisted of running stress-ng in --matrix 0 mode to fully load the CPU, and then recording the time and temperature from the Linux system, and measuring the CPU speed with vcgencmd measure_clock arm. Simple!

Bone-Stock Baseline

The absolutely worst thing you can do with a brand new Raspberry Pi 4B that’s going to see any load is to buy an unventilated case, like the official Raspberry Pi case, and put it in there, even at the stock 1.5 GHz. As you can see, plotted below in red, it starts throttling after as little as 10 minutes at full load, and that pulls the average speed down to something like 1.1 GHz after a while.

Opening the case up to get some cool breezes buys you a lot: there was evidence of just the tiniest bit of throttling at the nominal 1.5 GHz after just about 25 minutes on full blast, and it’s not so bad. This is why 1.5 GHz is the advertised speed of the Pi 4B: it’s right on the edge of where it’s happy, if left out in the open.

Compare this with the Compute Module at the same 1.5 GHz, in yellow, and you can see that it’s making less heat — the energy savings mentioned in the datasheet. No doubt, the Compute Module gets hot without a heatsink. But it settles down at around 75 °C in the open air, maybe 7 °C below the throttling threshold.

For contrast, check out the Pi 400 in blue. That massive aluminum heatsink does what it’s supposed to, and then some. At the stock 1.8 GHz, which is already 12.5% faster than either of the other modules, it’s not breaking a sweat — holding it down under 60 °C. You could run the Pi 400 full throttle forever, in my attic, in the summer.

Hotrodding the Pi 400

So if the Pi 400 runs just fine at stock speeds, what happens if we turn up the speed? To do so, I edited the /boot/config.txt file and set arm_freq=2000 and over_voltage=6 and rebooted. Why six? Because that’s the highest over-voltage level available without pushing the chip outside of its design envelope and voiding the warranty — you can go higher, but there’s likely little gain and you might burn things up.

(Oddly enough: the Pi 400 ships with over_voltage=0x11170 by default, which feeds it 0.95 V instead of the default 0.86 V, but less than the 1.03 V you get at over_voltage=6. I don’t understand the new format, so I didn’t play around with it. Anyone?)

At 2.0 GHz, the Pi 400 got up above 60 °C and showed signs of continuing to warm up even after 50 minutes, but it was nowhere near throttling. So I tried 2.2 GHz, at which speed the CPU refused to boot entirely. Backing down to 2.15 GHz, it ran just fine, so I left it for three hours. It settled in at a cozy 62.5 °C, which is warm, but well within specs. My guess is that is about the limit to the performance you’ll get out of the Pi 400, but note that this is all totally stock, and it’s hammering all four cores 100% for hours on end.

Given that all of the Pi 4 series use dynamic CPU speed, and throttle down to 600 MHz when idle to save power, there’s absolutely no reason I can think of to not overclock it. It’ll be faster when you need it, but not use more power when you don’t.

But the Compute Module and the Pi 400 have the same, more efficient, SOC in them. Could you get the same results from the CM4 with a little heatsinking? I bought some cheap heatsinks to find out.

Cheap Heatsinks Don’t Really Help

First, I thought that adding the small heatsinks to the CM4 would get it up at least into the 1.8 GHz region that the Pi 400 runs stock. And the answer was a definitive “kinda”. Where before it was on the edge of throttling at 1.5 GHz, the small aluminum wonder got it running at 1.8 GHz, on the edge of throttling. An improvement for sure, but not a good life for the SOC to be living.

For science, I put another cheap heatsink set on the Pi 4B and ran it at 1.8 GHz. This is as close to an apples-to-apples test of the two revisions (“B” and “C”) of the SOC as is possible — both boards had free air circulation, with the fins of identical heatsinks, oriented vertically. But overclocking isn’t kind to the Pi 4B. It got up to throttling temperature after just five minutes. Worse, it throttled so much that it ran at an average 1.5 GHz, no faster despite consuming more power and heating up my office.

The culprit is increasing the core voltage to facilitate overclocking, and maybe it’s possible to find a lower voltage setting that’ll run more efficiently, but at this point my conclusion was that cheap heatsinks are a marginal benefit at best.

Bring the Aluminum!

Not to be beaten, I went searching in my junk box for a heatsink that would fit both the CM4 and Pi 4B. Selecting a well-aged tube of paste from the heatsink cellar, and two gamer-grade overclocking zip-ties, I affixed the aluminum to both the CM4 and Pi 4B in turn. How would they run now?

First, I ran the CM4 with the larger heatsink at 1.8 GHz to give some basis for comparison to the cheap heatsinks. What a big difference a big hunk of aluminum makes! It settled in at a comfortable 68 °C or so. Even pushing it up to 2.15 GHz and leaving it for a couple hours, it stayed just a hair below 70 °C — a safe margin on the throttling threshold — and only a few degrees warmer than that huge heat spreader in the Pi 400. That worked!

When I tried to replicate the success with the Pi 4B, I ran into the first two spontaneous shutdowns in mid-run, which I didn’t expect to see due to the built-in thermal management. (Flashback from the era of lapping Celerons!) It seems that 2.15 GHz is just a little too fast for the 4B and the junk-box heatsink. I stepped it down to 2.1 GHz, and it ran on the ragged edge, for hours, with the heatsink oriented vertically. But it’s really on the edge: during the first 2.1 GHz run, I turned the board flat on the table after a couple hours, which meant that the heatsink was no longer vertical, and it picked up a few degrees and went into full crash. This is no way to live.

Summary

This whole experiment has been playing around with two effects. First, the CM4 and the Pi 400 have a slightly more energy-efficient chipset that allows them to run cooler or faster — take your pick. And that effect is very real, with the CM4 running about 10 °C cooler at the stock 1.5 GHz, giving a nice margin against thermal throttling right where it counts. Or if you’re willing to live on the edge, for the same temperatures and cooling solutions, you can run the CM4 at 1.8 GHz where the Pi 4B runs at 1.5 GHz, and that without a heatsink.

But over and above the efficiency gain, any member of the Pi 4 family will run up into the 2 GHz range with no problem if you put a good enough heatsink on it. How big is big enough? That’s going to be a product of your environment, your tolerance for throttling and/or shortening the lifespan of the SOC, and how badly you want to get the heatsink into a small space. From my tests with a junkbox heatsink, you should be able to figure out a passive cooling solution that’ll work for anything but the tightest of fits.

What’s definitely true is that the Raspberry engineers have pulled off a nice design with the Pi 400. A big enough hunk of aluminum gives them plenty of thermal overhead to run the four CPUs inside at full bore without breaking a metaphorical sweat, and on top of that it runs the more energy efficient chipset. I’m still surprised that the Pi 400 heatsink is so effective, being nothing more than a big sheet of aluminum inside a plastic box, but it is more than sufficient. I’m going to run my Pi 400 at 2.15 GHz, because — why not?

Does any of this make sense? In the end, you’re talking about a small and only moderately powerful single-board computer, not a liquid-cooled mega-number-crunching rig of doom. It has limited memory and a moderate GPU. The overclocking gains are on the scale of 10% to 30%, so they’re moderate as well. The configuration effort involved, editing a config file, is truly minimal, but you’ll spend a moderate amount of time and money sourcing the right heat sink.

For average workloads, you probably don’t need to overclock, and for hard-core workloads the Raspberry Pi might not be the right choice anyway. But if what you need is a mid-sized speed bump, you can get it. And in our mind, you might as well.

We think it’s cool that the Raspberry crew got their hands on a better silicon revision and put it into their two latest products. If the Broadcom “C” series SOC is a drop-in replacement for the “B”, we wouldn’t mind seeing the newer version in future Pi 4Bs. Why not? It seems to be about 10% more energy efficient, and while that’s maybe not earth-shattering, it’s certainly nothing to sneeze at. Meanwhile, just put a little bit more aluminum surface area on your 4B, and you’re all set.



from Hackaday https://ift.tt/3kl7Mlo

Comments

Popular posts from this blog

Fleksy + GIF Keyboard v9.0.0 [Premium] [Latest]

Clipboard Manager : Clipo Pro v8.19-pro [Paid] [Latest]

VPN 365 – Free Unlimited VPN Proxy & WiFi VPN v1.6.0 [Ad-Free] [Latest]