Raspberry Pi boosts Pi 5 performance with SDRAM tuning
jeffgeerling.com
jeffgeerling.com
I guess I understand this point of view if you were trying to use Pis to experiment with Kubernetes or something. You'd have built your own (desktop) PC or a personal server rack for that kind of thing, years ago. But for the vast majority of typical uses (Home Assistant, VPNs, etc.) a Pi is going to be way more than you need. It will sit there and silently and reliably run, for years at a time, powered by a USB cable. I know mine have.
Why would I consider replacing those with a bigger box, fan noise and a power brick? Maybe I'm missing something?
For those use cases, it makes sense that performance per dollar is the top metric that many people look for. Pi used to be king there too, but as Pi prices have gone up and the price of other cheap compute has come down, it’s harder to justify the Pi. The Pi is still a great board, but a Pi5 with case, power supply, SD card will run you $100+ (throw in an SSD and you’re at $200+ easy), meanwhile an N100 PC can be had for the same price.
There are certainly cheaper, <$100 TCO, alternatives to the Pi or N100 PCs... but they are accordingly worse performing. One thing Pi is really good at is having well supported options on the ultra low end. The Pi Zero 2W for $15 - it's crap performance but cheap. The Pi Pico microcontroller starts at $4 if you don't need a full OS (or just need to augment an existing box with GPIO over USB). If you're building a PC out of a Pi it's just not a differentiated option vs an actual PC is all.
Devices that solves both of those problems tend not to be price competitive with Pi, and many ends up paying for a Pi.
Ah, but if a Pi is more than you need,
you wouldn't be reading an article about boosting performance with SDRAM tuning
or indeed caring about the RPi 5 when the RPi 3 was more than good enough.
Intels iGPUs also support SR-IOV these days so you can get GPU acceleration to multiple VMs.
Streaming (local network - Sunshine/Moonlight) these days is really good. So good I consider moving my gaming machine to the garage and just stream it to a thin client or steam deck.
The biggest thing the Pi line gets you is good GPIO and premade hats using it (with prepackaged OS images). If you're just running standard software like a home assistant or VPN then it doesn't make much sense. Doubly so on articles about OCing it.
It’s versatile but really it has always sucked at those things. Yes, get a used N100 if that’s your goal.
The Pi shines in education and as an embedded device where power, size and maintainability are important. I spotted one the other day in one of those presses that crush pennies as a souvenir. It displayed an instructional video on a screen and also seemed to control the card reader device on the front. Why would you use a N100 in that context?
Raspberry Pi have found a price level and form factor that works for customers. The raw speed of the 5 is probably overkill for most user applications (the 4 is too IMO) - though edge AI and robotics need it, so there is demand. But ultimately the speed is there because a faster ARM chip fits within the cost-power-size requirements of the board.
The compute module variants do tend to shine in the edge robotics niche where you need to do some processing in a custom form factor and don't want to design or source a SoC directly... but you don't really need the "rest of the PC" the standard Pi models provide. Pis (any model) are a bit of a shit fit for edge AI in general though. The memory bandwidth is god awful (even compared to cheaper SBCs) and the hardware to meaningfully offload matrix operations just isn't there like it is in a lot of other embedded boards fit for purpose. This leaves you spending more $ to use more Watts for less AI compute vs typical embedded AI options.
The Pi foundation's big break was targeting ultra low cost markets (i.e. sub $50 TCO) with a well supported device that has/had a lot of hacker community mindshare. Any product they've made beyond that focus (i.e. not the embedded or microcontroller variants) has been a pretty bad technology fit which ends up in more drawers than deployments despite the hype.
The only reason I can think of to use a Pi is GPIO.
Plenty of Rockchip bargains out there but how long are they supported https://www.jeffgeerling.com/blog/2024/popular-rockchip-sbc-...
Meanwhile the original Pi model only just went EoL https://endoflife.date/raspberry-pi
At about twice the price for just the pi, I got a n100 machine (with a case and power supply and 500mb ssd and 16gb ram). Draws about 10 watts, is faster on every axis, and once you setup the pi with a case/psu it’s very close to the same price.
Idling?
Energy consumption seems to be 2x-3x higher. The RPi5 idles at ~3.5w and the N100 at 10w. But yeah, the N100 is faster.
You need a power brick for the N100 box.
Depends on what you need. The N100 isn't always "better".
> You need a power brick for the N100 box.
Yes, but it was included (along with the case) for $106 USD, delivered.
Granted, that was on special, but AliExpress has sales that get them down to $115 USD pretty regularly.
That a distro's principal maintainer steps down is unfortunate for anyone who is downstream from them, but it is not the end of the world. As the article mentions, other distros for Rockchip continue to exist.
> the official Linux kernel is more based on SoC vendor's BSP (Board Support Package) that can utilise full SoC features. And Hardkernel is able to consult with Rockchip in case we found missing SoC features only when the issue is discovered in their BSP, otherwise it's very hard. Therefore, we are managing the Linux kernel with most similar OS with the version from Rockchip, even Ubuntu 20.04 is not from Rockchip.
https://forum.odroid.com/viewtopic.php?f=212&t=47522
> What are not working: USB 3.0 host ports
> The images with upstream kernel would not be stable enough and features are not fully supported, so please do not use this image for your important project or to store important data.
https://forum.odroid.com/viewtopic.php?f=217&t=44462
>The only thing missing is a firmware capable of booting the operating system.
Since late 2023, ODROID-M1 is supported by mainline u-boot (odroid-m1-rk3568 target) and you can also use a mainline kernel (6.4 or later) which provides working USB 3.0.
I think VPU (video encode/decode) support is still partial and NPU (AI acceleration) requires an out of tree driver (rknpu2).
That said, I do also use an R.Pi 4 and an R.Pi 400.
The significant advantages of the R.Pi 4 and R.Pi 5 are
= R.Pi is a learning-first platform
= current Debian supported "out-of-the-box" with a custom D.E. and Wayland
= excellent community for software and hardware
= the R.Pi 400 (and the expected R.Pi 500) "keyboard computer" are unique in the marketplace, with all the community and support
= R.Pi is not an X86 platform, which may be favourable depending on your project requirements
I’m not sure I understand the point, because Debian supports N100 PCs natively, too. Or is a custom DE the advantage?
Yes, as a learning-first (teaching) platform, the custom DE is an advantage.
But further, the R.Pi does not need to be an over-sized solution or lead a benchmark with a top score. It just needs to be fast enough for learning and hacking with GPIO.
A computer doesn't need to have a gigahertz burst mode just to run an efficient little OS for coding.
As for Wayland, it only recently became the default WM. But it is nice to have.
If efficiency is your goal, you should prefer the N100 which is built on a 7nm class process compared to the Pi 5's 16nm.
Yep runs 32 GB just fine, even if not advertised. Also great Software support as usual on the PC Platform. Also more I/O, esp. PCIe than a Pi and you actually can buy boards with standard connectors. Also at least for server type use cases x86 is most of the time probably still a lot less painful than ARM.
This isn't true if Debian is supported.
As for the architecture per se, we should consider what Apple has accomplished with its switch to ARM.
Architecture largely doesn't matter these days, just how you implement it and what fabrication you build it with.
Effectively the same thing for basic desktop use, disregarding wayland, as doing a basic bare bones debian x86-64 CLI only install (totaling something like 1.2GB disk space used) and then "sudo apt install xorg xfce4 xfce4-goodies libreoffice gimp thunderbird firefox-esr gthumb nautilus konqueror", or whatever other list of applications one wants to install along with xorg and the desktop environment.
Pi is ~70 EUR including ~25% VAT.
Cheapest N100 I found in 5 minutes of searching was a ACEMAGIC T8 Plus for ~160 EUR. (Currently sold out)
Now add a power supply and case.
I put them into a 3D printer that already has all that.
But I need to add a 16 or 32GB SD card. Around 10 EUR, maybe less.
No one ever talks about just how easy it is to add GPIO to anything.
Right now I could buy a 4 GB Pi 5 setup (Pi 5, case, power supply) from CanaKit for $82. $97 if I didn't have an SD card to spare.
I don't buy mini PCs from random companies. The last N100 I bought was the NucBox G2 for $139:
https://www.amazon.com/dp/B0CCDL6VS3
If I didn't need the second ethernet port I probably would've grabbed the NucBox G5 for $136:
GMKtec sells on AliExpress if you don't mind going that route:
Also, the N97 has better performance than the N100, but the power consumption is higher. For me its a plus as it's more powerful than the usual N100 mini PC's while much smaller and fan noise is quite low (for now at least...). Not really intended for high workloads and 24/7 anyway. More like a backpack PC.
[1] https://www.amazon.de/-/en/G5-Computer-Generation-12GB-256GB...
Presumably your prices have VAT?
It doesn't look like the AliExpress prices have changed if you don't mind going that route.
Yes they're about twice the price of a bare Pi5, but they come with metal cases and power supplies, can fit an M.2 NVME without add-ons, and like the first example also includes some RAM and storage.
While likely not the best quality RAM and storage, what I got in mine has held up to light use for several months so far without issues, so better than nothing. YMMV.
I bought a few 2GB RPi4's when they were $35. At that price point they were great. I don't get the RPi5, especially 4GB+ variants.
That's why I think the lower-end, lower-priced RPi4 made more sense. Fast enough to have decent network speed and run a lot of functional workloads, cheap enough that you could "spam" them.
Take for example the OrangePi Zero 3[1], which you can get[2] from around $25.
Armbian provides community support status[3], so you're relying on volunteer efforts to provide updates and support. Also drivers for peripheral devices might be missing[4].
There are others, like say the NanoPi Zero2[5][6] for around $20, but again, support might vary. The Zero2 is so new it's not listed on Armbian, and most of the other NanoPi's are under community support.
That said, I've been running some NanoPi ZeroPi's (the Zero2's predecessor) for several years now, without any issues. Just using them for light loads, one is my PiHole for example, but yeah can work great as long as you do a bit of research in terms of what's supported and not.
[1]: https://www.cnx-software.com/2023/07/03/orange-pi-zero-3-all...
[2]: https://www.aliexpress.com/item/1005007673457198.html
[3]: https://www.armbian.com/orange-pi-zero-3/
[4]: https://linux-sunxi.org/H616
[5]: https://www.cnx-software.com/2024/09/13/nanopi-zero2-tiny-he...
[6]: https://www.friendlyelec.com/index.php?route=product/product...
You do need to buy SODIMM DDR4 (12-14eur for 8gb), m2 NVME for storage and power supply (which you have to buy for rpi5 also).
You end up with a board with way better ports and IO, better audio dac, and significantly faster performance all across the board.
Raspberry PIs 5 and such offer poor value and are very overpriced.
Raspberry Pi Zero 2 W, Orange Pi Zero 3 and RP Pico still provide good value. (for 3d printers and such)
Yeah it'll be 7 years old but it'll still be much faster than a rpi5.
Even a mediocre Intel 120GB sata3 ssd from 8 years ago will run circles around a microsdxc card in disk performance.
These mostly come from corporate lease environments and have very little write wear on the ssd and are very clean.
The raspberry pi is more useful if you need the gpio pins or want something really small and perfectly silent for some embedded application.
You don’t need a microSDXC card for the pi, you can boot it off an SSD, which is what my old PI4 does to run Proxmox Backup Server.
You ca get GPIO on the cheap from a Arduino, ESP8/32, or RP2040 microcontroller. RPi itself is far too wasteful for that.
> People using them as cheap computers ruined it.
False, industrial users using them in all commercial embedded products ruined it.
Almost nobody is using RPis as cheap computers at home since they suck at that: too expensive, too underpowered and too limited in functionality to be a computer for the average joe
My RPi 2 becomes an unusable stuttery mess when I open a web browser and for the price of a RPi 5 I got a used quad core Intel 8th gen laptop with 8GB of RAM and 256GB SSD which not only beats the RPi at any and all computer tasks, but it also comes with built in keyboard, 1080p monitor, battery, charger and I can take with me to do work on the go. The only thing I see the RPi good at at home is a headless PiHole/VPN or whatever, not as an actual desktop computer replacement.
Of course you can fall back to the previous standard idea - connecting an Arduino to another computer and communicating by the serial port.
IMO it is the people using them as embedded controllers for their products that ruined it, in combination with the poor decision by the Raspberry Pi folks to prioritize commercial demand for the products over hobbyist demand during the pandemic. We hobbyists "made do" with other solutions in that time, and now there's no real need to go back.
First, the overall footprint of an RPi5 is way smaller, plus RPi is easier to cool passively than an N100, also it allows RPi5 to be lower maintenance on the longer run.
Most N100 are noisier, hotter and bigger than a Pi5 (I have a smaller N100, but it's still actively cooled).
When paired with a decent A2 card (e.g.: Kingston Canvas Go), the SD-card related lag disappears. Add a good external SSD, you have tons of solid state storage. At that point you can just forget it.
I like my N100, and companies like GMKTec routes 2 PCIe lanes to NVMe slots allowing ~1.5GB of throughput, but for most home use, that's overkill. I rather use Pi as a server and N100 as a desktop (which is exactly what I do).
At that point you can just underclock an N100 NUC for the same price and almost the same TDP (it's pretty much even with the SSD). Most vendors configure the CPU well into diminishing returns for marketing reasons and even a small undervolt can make them passive (the same is true of many laptops).
I get the form factor issue but exposed RPis without the enclosure (more $$) are a burned out board waiting to happen. I use them in enclosed hardware that needs gpio like 3d printers but the N100 wins every other time.
Many N100 systems come with 5W TDP as default. However, this is more of an "average" TDP. It doesn't prevent the CPU to enable its turbo and exhaust its thermal budget. Forcing it to lower envelopes via cpufreqd would work, but you're limited by your fan again, which will make everything dusty, eventually.
I have found a pretty cheap completely aluminum case [0] which sucks heat from every IC and bottom of the case via silicon thermal pads. It keeps the processor at 37 degrees, cools USB bridge and power controller too.
With no moving part, case is almost airtight. So, it's sitting snug and cool in that case. You can't burn RPi in that configuration.
[0]: https://www.amazon.com/GeeekPi-Aluminum-Raspberry-Cooling-Th...
Oh, upboard. That thing starts from $229 as a box. Not exactly cheap, and 8GB/64GB version is $279.
At that point you can just underclock an N100 NUC
for the same price and almost the same TDP
Good advice, thanks. Been so long since I underclocked/undervolted I literally forgot it was a thing!I went from a passively cooled RPi5 to a N100. The RPi idled at around 50°C and throttled under load. The N100 keeps 56°C under light load (the heaviest things are rtl_433, grafana, nextcloud). To keep it from throttling in heavy load I zip tied a small Noctua NF-A4x20 to the side of the case over the passive heatsink and adjusted the fan curve to only run at above 60°C. This works super well, the N100 doesn't get hotter than about 62°C under full load and the fan spins slow enough that I can't hear it at all even if I put my ear directly next to it.
edit: I replaced the thermal sticker for thermal paste, not sure if that could have affected it, the paste wasn't the conductive kind.
[1]: https://www.amazon.com/GeeekPi-Aluminum-Heatsink-Raspberry-I...
The room the Pi lives has a wool carpet, too.
[0]: https://www.amazon.com/GeeekPi-Aluminum-Raspberry-Cooling-Th...
I applaud your creativity but surely this is an indication of the limitations of the architecture!
Thats somewhat surprising. I have an old 14nm Celeron I use as a home server and under typical usage it is a few degrees above ambient. Checking now it is 26C. There is no fan, and it just has whatever tiny stock heatsink it came with.
I wonder why N100 is running so hot for you.
That's not a fair price comparison.
Even in embedded where you have contracts to ensure the same hardware will be available for a decade everyone has moved that way because eventually the hardware you rely on goes out of production and so you need to support new hardware.
I have to add special code when I port from rPi4 to rPi5, code like this (in Python) for some GPIO logic:
chip = None
try:
# rpi5
chip = gpiod.Chip("gpiochip4")
except FileNotFoundError as e: # rpi4
chip = gpiod.Chip("gpiochip0")
Now imagine having to support whole zoo of N100-based machines from different manufacturers?With Raspberry Pi, you can always expect to just buy more of your rPi device. I've seen people rely on Orange Pi only to find that it's out of stock and they need to port their code to rPi now.
Ecosystem of HATS
GPIO
camera connector (better than most usb cameras)
Last I tested, the ARM quants were actually slower on a Pi 5 than Q4KS, but I later learned I messed up some compile flags and haven't had the chance to retest lol.
= TFA also mentions that the R.Pi 4 can be tweaked [1]
= an R.Pi 500 is in development [2]
[1] _ "The tweaks can also give the Pi 4 a boost, but the Pi 5 improves more dramatically"
[2] _ "Pi 500 Geekbench results starting in September—all seemingly with these tweaks in place already!"
Where can I sign up to not miss the new official firmware release?
Edit: well, I'll just do the firmware upgrade now, why wait...
I wonder why this is not available on PCs. tREFI tuning has a big impact on performance, and having an automated guided optimization based on temperature would be nice.
Does this increase susceptibility to rowhammer?
for x86 or other arm platforms, these changes comes once in a blue moon. but i do wonder how much further improvements could be achieved from other unexplored optimizations.
It looks like it does https://github.com/raspberrypi/firmware/issues/1854#issuecom...
> In the worst case, two sdram clients accessing different pages of the same bank, may cause repeated closing and opening of the pages, harming the usable bandwidth you can achieve. Which pages belong to a bank depends on the physical address lines of the buffers used. We have found that it is pretty common for buffers to be allocated in pathologically bad ways.
> NUMA allows us to have more control over this. We can split our sdram, into, say, 8 NUMA regions, and configure the kernel to interleave the allocations between the regions. In addition the sdram controller allows the address bits used for segmenting the banks to be reconfigured (which we've exposed through eeprom config SDRAM_BANKLOW).
I think he used a GMKTec G3, and the numbers were not bad, but active cooling adds a constant whine to background. Some companies' fans are more whiny than others, too.
N100 is not a "cool" chip by any passive cooling standard, esp. under load. However, its standard (software limited) TDP is around 5W IIRC. You can increase that limit for more speed and added noise.
On the other hand RPi5 idles around 37 and reaches 50 degrees C while passively cooled with a heat-sink case.
Not if you put a large fin block on it.
And we're talking about tinkerers after all, which is the target market for the RPI. Parents won't be buying RPis en-masse for their kids from Walmart to use as their main computer for school instead of Macs, iPads, Chromebooks or Windows laptops.
Average Joes who aren't into tinkering, aren't daily driving a RPI as their main computer. It's a DIY toy/tool for those who want to tinker, learn and make stuff, so some added effort is implied anyway.
I especially bought that passive case for my Pi, because it's destined to be a "tuck away server" from get go, and it's trucking along just fine. I'm adding services on top of it slowly, and it's not showing any signs of fatigue.
A2 card and faster SD support really makes that one shine, without adding hats on top of hats. Again, OrgangePi 5B has better hardware, but way worse support.
They put a tiny 40mm fan on top which resonates with the plastic box and screeches like an absolute banshee all_the_time. That one is a must-remove since it also blocks installation of any heatsinks on the nvme/ram, and a mesh top results in roughly the same temps. But they gotta put their logo on top, priorities.
The second problem is the main cpu cooling, which is actually a really well made bottom intake blower side exhaust setup... but it's set up to run at like half speed even when you're at 30 degrees and there's no bios fan curve control for it except for extreme temp steps. I'm currently pondering adding a pico or attiny that reads the board PWM and retransmitts it so it only runs the fan when it's set above usual. Or maybe just a full passive copper block replacement, but that would require a case redesign...
Otherwise it's a really capable little machine if they put a little effort into making it shut the fuck up at idle.
Looks like K9 needs to move more air since it's packaing an U5 in that small box, so cooling them silently is much harder.
But if you run the N100 flat out, which is likely to happen given that it's not the fastest thing, and disable turbo on this one (which I've done for now since my use case is a low power server) they are actually surprisingly close in heat output. The Radxa X4 tried to cool the N100 like a Pi 5 and it almost melts.