Chasing A Raspberry Pi Bottleneck

The Raspberry Pi has been used for many things over its lifetime, and we’re guessing that many of you will have one in perhaps its most common configuration, as a small server. [Thibault] has a Pi 4 in this role, and it’s used to back up the data from his VPS in a data centre. The Pi 4 may be small and relatively affordable, but it’s no slouch in computing terms, so he was extremely surprised to see it showing a transfer speed in bytes per second rather than kilobytes or megabytes. What was up? He set out to find the bottleneck.

We’re treated to a methodical step-through of all the constituent parts of the infrastructure between the data centre and the disk, and all of them show the speeds expected. Eventually, the focus shifts to the encryption he’s using, both on the USB disk connected to the Pi and within the backup program he’s using. As it turns out, while the Pi is good at many things, encryption is not its strong point. Some work with htop shows the cores maxed out as it tries to work with encrypted data, and he’s found the bottleneck.

To show just how useful a Pi server can be without the encryption, we’re using an early model to crunch a massive language corpus.

Header image: macrophile, CC BY 2.0.

9 thoughts on “Chasing A Raspberry Pi Bottleneck

  1. Poor guy, wound up buying a MinisForum UM880 Plus.
    I don’t get it when big companies are throwing out Lenovo Tiny, Dell Micro and HP Mini machines left and right. I got one with a 12th gen Pentium chip for $118 last year, had a 2 year refurbished warranty! Came in the OE box with stand, keyboard and mouse. I also got a 7th gen i3 Dell Micro from Goodwill for $8 last year, came with a 128GB Sata SSD.

    Something like the Lenovo m720q can host 4 NVMe drives with a PCB available on Github. If you get the very similar P330 motherboard that goes to 5 NVMe (the two original, and 3 more from the custom adapter).
    MinisForum has crazy mindshare though.

    I’m glad he did the testing, but sorry he splashed out for a crazy expensive ‘NUC’ (for context I got a touchscreen 7840u Lenovo T14 Laptop for similar price to the 880 Plus, also built a 2L ThinITX PIO for similar price and that included a $300 RTX4060 Low profile and GaN power brick)

    I understand he will run some different applications on it and likes just ordering a box, I obviously love building the hardware.

    1. Yeah, 100% spot on

      I love the RPi zero Ws – getting a wifi Linux SBC at that price is awesome, and there’s so much community support for Pis compared to the alternatives. If I’m being honest though all of mine are sitting in a box, retired by various wifi microcontroller boards.

      However, full size / full price Pis are not the same value proposition. Used small x86 machines are darn cheap now, especially the corporate eol ones as you mention.
      The full size Pis are simply a poor choice for most uses, as you can easily get an x86 machine with massively better specs across the board for less money.

      The only times a full size Pi should be considered are (IMHO):
      1) low power is a requirement (like with a battery/solar project) – if this is the case you’ll likely not use an rp5.
      2) space is extremely limited. A mini PC is not very much bigger than a pi, so you’d have to be working in a pretty tight spot.

      If you need gpio just grab a pico w for $5. If you need to do linux-y things do them on a headless server running on a small x86 machine and communicate with the pico over network.

      1. I see my RPI5 post disappeared (thought I wrote/replied this morning), so I guess either not politically correct to write about that board or I forget to ‘reply’ :) . Oh, well. RPIs are not all about money though. I like all RPIs and just use them. RPI5 is much better choice for a data server than the RPI4 for many reasons. Now all my RPI-4s have all been replaced. and will be repurposed to use in other projects where ethernet/usb is not needed. Enough said.

    2. wow the um880 is an incredible machine and at a high price to match. given that the article makes it sound like the pi was just too slow for ssh or vpn??? i’m just stunned

  2. He was using a RPI-4… I too gave up on using it as a data server (home use). To bad he didn’t use an RPI-5 in his test as it is much faster and it has crypto extensions in CPU. The usb speeds are ‘much’ better due to independent USB/ethernet controllers as well as M.2 support. The rpi-5 is really everything one (well most) would need for a home data server. I’ve been running one as a backup server for a couple months now in parallel with my older home data server. Working very well — for me. I am spinning only 2Tb of data though.

  3. Raspberry Pi as a server, very sad. My home server is a Mini-ITX N100 running Linux, air cooled, no fans needed. It’s low power, much faster and all the I/O is built into the motherboard. Raspberry Pi’s should be relegated to tasks that are beyond the capabilities of an Arduino or ESP32. My Pi4 runs my amateur radio hotspot.

    1. You aught to try it with an RPI-5 as an experiment. I think you’ll find the RPI-5 works rather well. I currently have an external USB Samsung T7 4TB SSD attached for data. The RPI-5 is running a PiDP-10 front panel and is running MIT ITS OS. This same rpi boots from a Samsung T5 500GB external SSD instead of SD card. I also added a powered RPI USB 3.0 hub as I attached an external 5TB HDD as a ‘local’ backup for kicks. So ‘three’ USB drives attached. The RPI-4 would have (and did) puke on just a ‘two’ drive system due to controller and power issues. All peripherals are sitting ‘behind’ the PiDP-10 front panel on a shelf — unseen, yet easy to access. The RPI-5 is plugged into a UPS to take care of any electrical hiccups as all servers should.. . I think it turned out rather well. YMMV of course.

      I could have went fanless as the RPI-5 isn’t being ‘pushed’ to the edge to degrade performance for this use. I would still use a passive heat sink though rather than a bare CPU. Anyway, I did install the standard RPI heat sink with fan ‘just because’ I could. Fan rarely runs as it turns out. If fan becomes noisy in time, I’ll just unhook it and run passive.

  4. The article is named, “Why is my Raspberry Pi 4 too slow as a server?”

    That’s misleading, because the author wasn’t testing it as a server. The author was benchmarking some program called “kopia”. So a better title might’ve been “Why is my Raspberry Pi 4 so slow to set up when using a certain inefficent backup program while doing multiple levels of encryption?”

    A Raspberry Pi 4 runs as a server just fine.

Leave a Reply to MilesCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.