Measuring high-speed network performance with CubieTruck
Bluetooth
The CubieTruck also has a Bluetooth 4.0 interface, but enabling it is anything but trivial. The interface first appears as a UART (i.e., a serial interface). As of an intermediate Arch Linux kernel version, however, only one interface was configured, which explains why I had to build the kernel from the distribution source code (see the box titled "Bluetooth on the CubieTruck").
Bluetooth on the CubieTruck
If the kernel detects the Bluetooth interface, you need to enable it with the bcrm_patchram_plus
program, available from Google Code [6]. The utility loads the firmware and enables the interface with the command:
./brcm_patchram_plus -d --patchram /lib/firmware/ap6210/bcm20710a1.hcd \ --enable_hci --bd_addr 11:22:33:44:55:66 --no2bytes --tosleep 1000 /dev/ttyS1
You can freely choose the MAC address of the Bluetooth interface, but before starting you still need to load the g2d
kernel module.
In practice, the whole setup proved unreliable: In most cases, I had to run the tool several times before the HCI interface was finally available. Sometimes I even needed to reboot.
When attempting to create a PAN server (the counterpart to a WiFi access point in Bluetooth for Ethernet over Bluetooth), the old kernel, relative to recent packages of the Arch distribution, kicked up some dust: In this configuration, the BlueZ daemon wanted to add the BNEP interface to a bridge, but running the corresponding system calls with EINVAL
failed. The only hope here is to wait for the next mainline kernel.
The Cubie Ruler
To measure the throughput on layers 3 and 4, you will not find performance testers like those from commercial suppliers; instead, Linux admins typically opt for open source packages such as netperf
[7] or iperf
[8]. Both consist of a server and a client component, wherein the client establishes a connection to the server, sends packets, and measures how many packets successfully reach the other side.
Netperf is slightly more powerful, because it also measures the connection setups per second in addition to tests for rating the bandwidth; it even provides SCTP [9] support.
The most important measurement parameters are achievable bandwidth for large packages and the oft-neglected packet volume per second. If you're testing firewalls, the connection setup rate is quite important, because a firewall must make several entries in the connection tables for each new connection.
Throughput
In the throughput tests with CubieTruck as the sender or receiver, Netperf was a disappointment: More than 30MBps was impossible. The situation was different with Iperf, though. The CubieTruck achieved up to 550MBps as a transmitter and 850MBps as a receiver (Figure 3). In comparison, a Raspberry Pi reached nearly 70MBps with Iperf.
To discover the maximum number of packets with Iperf, you need to set the package size and total bandwidth parameters accordingly. The server must be set to UDP using the -u
option. Packages will be lost at some point, so the maximum value is achieved when no or only very few packages are dropped. The parameters on the client side are -b <bandwidth>
and -l <packet length>
.
The CubieTruck achieved a maximum of 55,000 packets per second. In comparison, a Lenovo notebook with an Intel Core Duo 2GHz creates some 169,000 packets, and a Raspberry Pi achieves fewer than 8,000 packets per second.
One thing became evident in the tests: if you configure the CubieTruck for a tagged VLAN, then throughput drops off sharply. In the dmesg
output, you will find messages such as
GMAC TX status: VLAN frame
which leads me to suspect that the driver tried offloading, but not efficiently. In this scenario, you will want to leave the tagging to the switch.
Other tests were run against web applications. One of the fastest scanners is Skipfish [10], which is also useful for testing the performance of web servers or their components, such as the web application firewalls, because Skipfish also outputs information about the HTTP requests per second during execution.
« Previous 1 2 3 Next »
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
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.