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.

Figure 3: Iperf throughput test with CubieTruck run in server mode.

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.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
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.

Learn More

News