Measuring high-speed network performance with CubieTruck
Truckin'
The CubieTruck small-board PC is a measuring instrument that copes well with Gigabit networks and offers a surprisingly affordable and efficient solution.
Any network infrastructure on which LTE connections are used quickly reaches its limits. The project in this article includes throughput tests; however, because LTE technology supports bandwidths of more than 100Mbps, my MacBook Air was ruled out, because it only has a 100Mb USB Ethernet adapter. The various Raspberry Pis, with 100Mbps interfaces, are not fast enough either, so my task was to find an affordable alternative that ran Linux.
Two single-board computers (SBCs) were on my shortlist: the CubieTruck [1] and the Wandboard [2]. Both small PCs have newer versions – the CubieTruck is the third generation of the Cubie family [3], and versions of the Wandboard also exist with more CPU (performance and cores) and more RAM; both boards offer Gigabit Ethernet. However, I couldn't find a retailer offering the Wandboard, so I finally decided on the CubieTruck (Figure 1).
CubieTruck
Figure 2 shows the CubieTruck package: The board comes with a small, ultrathin heat sink, a SATA cable for connecting hard drives, an OTG cable, a USB cable, a power cable, and a case or mounting plate; the microSD card and the console cable, which proved very valuable for experiments with self-made kernels, come separately.
Because the CubieTruck has 4GB of built-in NAND memory, the microSD card is not really necessary, but it is especially helpful for network monitoring. Today, 4GB is not overly expensive, and the built-in NAND memory is comparatively slow.
The system features two USB 2.0 ports, HDMI, and digital optical and analog audio ports, as well as a VGA port. The CubieTruck also features an infrared receiver, an OTG port that can also be used to supply power, Bluetooth 4.0, and 802.11b/g WiFi. The 2GB of RAM and a dual-core Allwinner A20 CPU, which runs at a maximum 1GHz, ensure sufficient processing power. Finally, the board provides freely programmable GPIO pins, as well as a UART port, although you need a TTL cable for this.
Performance
To get an idea of the performance of the CPU compared with a Rasp Pi, I experimented a little with the openssl speed
command, which offers benchmarks for all kinds of encryption and hash algorithms. The rsa1024
parameter tells it to generate 1024-bit RSA key signatures and check them.
The Cubie managed 158 signatures and 2,800 verifies per second compared with the Rasp Pi's 120 signatures and 2,010 verifies. The difference is even more significant given that the Cubie only used one core for this test. Calling the command twice simultaneously on the Cubie returned double these values.
In the case of SHA1 hashes, the Cubie managed to hash almost 5,000KBps for 16-byte input, compared with 2,300KBps for the Pi. The bigger the input, the smaller the difference; however, at 8,192 bytes, the Cubie managed 48,000KBps compared with 40,000KBps for the Pi. Here, too, the Cubie used only one core.
Installation
Initial installation is carried out on the internal NAND memory using a tool called PhoenixSuit [4] via the OTG cable. Budding CubieTruckers need to press a button on the board when powering on so that the board boots to FEL mode. The NAND memory then acts like a USB hard drive, so the image ends up on the card.
If you use an SD card, you can write the operating system to the card from your computer using dd
, as for the Pi. In the default boot order, CubieTruck first tries the SD card slot and then the NAND memory.
Arch Linux was used for the tests; the CubieTruck starts a customized version of the U-Boot bootloader after you initialize the hardware in the first step. This offers the possibility of interrupting the boot process through the serial console so that you can use other kernel versions or parameters.
Linux development for the Allwinner CPUs is unfortunately lagging behind current development. Arch Linux uses the tree developed by the linux-sunxi community [5], whose latest version is 3.4.90. Several attempts to build a kernel resulted in a booting system, but I was unable to get the Ethernet interface to work with more recent kernels.
A bug in the default configuration of the Arch distribution kernels required a config option change. To do this, I had to use the Arch build system and manually customize the kernel configuration that comes with the sources. You can download suitable Arch builds via the
git clone https://github.com/archlinuxarm/PKGBUILDs
command.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.