(Trying to) Migrate to a low powered ARM based desktop

After a year of using the same desktop setup (based on a 2013 Elitebook 820 G1), I concluded that the large majority of my time was spent in Linux and in a handful of applications that ran mostly in Chrome. Given this was the case, I tried to make the switch of my personal desktop over to an ARM based desktop: the Raspberry Pi 4 (from here on in referred to as RPi4).

This did not go well. If you want to buy a cheap powerful computer, buy second hand. This will be revisited once I have a second case to compare if a different cooling solution changes things. For an educational experience, I recommend the cheaper 2Gb or 4Gb versions of the Raspberry Pi 4, or even better still: the Raspberry Pi Zero W

My test methodology for my desktop favours subjective over objective factors. That is, if it is good enough to be used, it is good enough for me.

Hardware / Parts list

Selecting the PI Desktop (all from kubii.fr, apart from the SD card from amazon.fr).

I especially like the Raspberry Pi ecosystem, non-profit (Raspberry Pi Foundation) and open source philosophy, and the locally built approach (from a factory in Wales, UK). 

First Impressions Are Good…

The install process if you have used a Raspberry Pi before, is fairly painless. The board and fan clips into the case. For the OS, you download an image, flash the micro SD card with dd, and boot the computer. There are other options if you prefer a GUI as well. Raspberry PI OS will take you through a brief intro wizard to secure the pi user and then hand it over to you.

Things just mostly work: network connectivity, chromium (the open source version of chrome), USB devices (keyboard, mouse), screen (HDMI), all plug and play. It’s a fairly impressive out of the box experience for a DIY kit.

If you have set up a Linux workstation on debian and have your install notes / scripts at hand, setting up the Raspberry is fairly rapid.

One important note: as of Feb 2021, Google does not provide an official build of google-chrome, so streaming websites that require secure video decode (like Netflix) will not work.  For the most part, web browsing and video playback from the web was smooth and reactive.

… and the experience went south from there

Adding on real workloads brought to bear all the pain points for this small computer:

  • Performance: The major drawback to the RPi4 is the performance in day to day work
    • Development: Visual Studio Code, vim, git, node, npm, python, and other typical Linux tools work more or less flawlessly. This was one of the principle reasons for the purchase, so a hugely positive thing. Migrating my 
    • Productivity Apps: Google Workspace works fine, but there is a slight lag between input and the application. This is probably acceptable for day to day work, but it is there. Using applications installed locally such as abiword, was fine.
    • Video conferencing: Google Meet was unusable. The stock RPi4 could barely run a video call and it did so with noticeable client lag. Other participants complained of bad video, but acceptable audio. 
      • Other sites you may see state that the RPi4 can handle Google Meet: I can say with the standard build + case + fan, it does not.
    • Network performance: Chromium based benchmarks suffered because of the software imposed overheads of chrome. Going to fast.com returns under 100 Mbps, on a GigE fibre connection. I suspect that Google Workspace performance was hampered for this reason.
      • On background services and command line based apps, the RPi4 benchmarks over 600+ Mbps to the internet over GigE wired ethernet, a much more acceptable result.
  • Raspberry Pi OS: Was made for the hobbyist in mind so it’s fairly easy to customise into something that you want. Main changes I made:
    • Window Manager / Desktop look and feel: RPi4 was already based on LXDE and openbox, so it just took some configuration to remove and adjust it to be more like CrunchBangPlusPlus.

Taking my medicine – performance optimisations

To make the RPi4 useful for day to day use, some changes were required to address the performance of the device.

  • Physical changes: I added holes in the top case to allow the case fan to ingress cold air and holes in the bottom case to allow egress of hot air. The temperature tops out at about 70C under stress, well below the thermal cutout limit.
  • Overclocking: Based on this Tom’s Hardware guide, I overclocked the cpu to 2.0 Ghz and the GPU to 600 MHz. After overclocking, Google Meet was still unusable.
    • At 2.147Ghz core and 750 MHz GPU, the RPi4 was unstable, so I can’t really recommend this configuration.
  • Fan settings: I set the temperature trigger at 68C. It comes on most of the time (unfortunately, meaning that a new case is probably required).
  • Chromium Video Acceleration: There is a good guide at this link.
    • Install some packages: sudo apt-get install libgles2-mesa libgles2-mesa-dev xorg-dev
    • Reboot and enable some chrome://flags:  
      • Override software rendering list
      • GPU rasterization
      • Out of process rasterization
      • Hardware-accelerated video decode
    • Restart chromium and check chrome://gpu

After all of these optimisations, the performance was still not enough to be usable for Google Meet and my daily work. It is however good enough for a daily desktop, media center, and web browsing. 

Synthetic Benchmarks

Given the performance problems, it was time to measure it on synthetic benchmarks. Using stress-ng over 180 seconds show the story, compared to my other hardware:

  • Raspberry Pi 4 / 8Gb: 35286 bogo ops 
  • Elitebook 820 G1, Core i5 4th Gen, 2.5Ghz: 111350 bogo ops

The numbers explain the gap in performance.

~/ >  stress-ng --cpu 4 --timeout 180 --metrics
stress-ng: info:  [28515] dispatching hogs: 4 cpu
stress-ng: info:  [28515] cache allocate: using defaults, can't determine cache details from sysfs
stress-ng: info:  [28515] successful run completed in 180.17s (3 mins, 0.17 secs)
stress-ng: info:  [28515] stressor       bogo ops real time  usr time  sys time   bogo ops/s   bogo ops/s
stress-ng: info:  [28515]                           (secs)    (secs)    (secs)   (real time) (usr+sys time)
stress-ng: info:  [28515] cpu               35206    180.08    700.90      0.26       195.51        50.21

Next Steps

I’ll continue the review with the Raspberry Pi HQ Camera and an unexpected comparison.