Parking the CubieTruck

19.09.2020 15:30

Back in 2013 I bought the CubieTruck, a single-board computer based on the Allwinner A20 ARM system-on-chip. Soon after I got it up and running with Debian I began using CubieTruck as a tiny home server. I eventually migrated this blog to it as well after my other server was knocked off-line by ice. It's been happily running on a shelf for almost 7 years now and has been an incredible value for its original 100 € price. It has been showing it's age though and with Debian Jessie running out of security support it was time to move on. I had a spare Zotac CI327 ready as a replacement and a few weeks ago I finally managed to move the last services off CubieTruck.

CubieTruck in its full dusty glory.

My CubieTruck really had a very good track record as far as reliability goes. It currently has a 464 day uptime and in recent memory only got reset because of a short power outage. In its early days I had problems with CRC errors on the SATA bus. This mostly got resolved after I changed to stock cable that came with it with a different one. At least it never again caused filesystem corruption (that I know of). The UDMA CRC error count reported by SMART currently sits at 276. It still incremented by 1 every once in a while, most often when I was doing something in the physical vicinity of the CubieTruck. I suspect the SATA signal integrity was still pretty marginal, even with a different cable.

Unfortunately, the long uptime is also a symptom of the largest problem I had with it: hugely outdated kernel. The SoC requires running a special Allwinner fork of the Linux kernel and it was soon severely outdated. I'm very grateful that Daniel Andersen kept the kernels updated with upstream patches for as long as the 3.4 branch was officially supported by kernel developers. Still, the last released one which is running on it right now, 3.4.112, is ancient by modern standards.

There was an effort to merge all the required code to the upstream kernel. As far as I remember it did come to a point where running the upstream kernel was perfectly viable, but I never did it. The problem was that NAND flash was never well supported. CubieTruck boots off 8 GB of on-board flash. Without support for it in the kernel you can't access the boot partition from Linux, which in practice means no easy kernel updates, which is the whole point. The alternative is to boot off an SD card, but I wanted to avoid that at all costs.

Zotac Zbox nano CI327

The machine I'm replacing CubieTruck is a Zotac Zbox nano CI327. It is itself outdated at this point and has a quad-core Celeron N3450 and 4 GB of RAM. I've also installed a Kingston 120 GB SSD (SA400S37120G). Unfortunately I haven't done a comprehensive HTTP benchmark comparison like I did last time I moved my blog installation. Mostly because I forgot about it, but there's also the fact that I don't know how to properly benchmark a HTTP service anymore. Apache Benchmark I used last time doesn't give representative results because it doesn't support SSL session caching.

I did measure how long it takes to rebuild the blog though. This is a single-threaded Perl process that builds around 25 MB of HTML files. The following shows user space time as reported by the time utility. I recorded the fastest run out of three on each machine:

CubieTruck Zotac
CPU time to rebuild static pages 51.4 s 9.0 s

As you can see, Zotac really leaves CubieTruck in the dust in this test. The CubieTruck numbers here aren't comparable to my old test. Even though the method was the same, my blog now has more entries and hence takes more effort to build. Also, in my previous test the CubieTruck was still running of an SD card, before I installed a SATA SSD.

Graph of the load time of my blog's home page.

As far as HTTP performance goes, I did notice this nice drop in the page load time graph after migration to the Zotac. This is from a Munin plug-in that runs on some other host on the Internet and requests my blog's homepage. On the other hand, server's 90 percentile response times for regular traffic haven't changed noticeably. In any case, CubieTruck was already fast enough to handle HackerNews home page traffic without major problems.

In conclusion, CubieTruck has been a joy and one of those machines that leave a lasting good impression. Even though it's inviting to scavenge its SSD I will very likely keep it around in case I need an ARM build machine or something similar. As far as I know it is still one of the rare ARM-based single-board computers that has decent storage performance due to it's native SATA interface. It's unfortunate that later Allwinner SoC versions abandoned it. It was only recently that the new Raspberry Pis with USB 3 got significantly better throughputs, although I would still like to see some long-term reliability figures for USB 3-attached storage.

Posted by Tomaž | Categories: Life

Add a new comment


(No HTML tags allowed. Separate paragraphs with a blank line.)