Thursday, 18 May 2017

Odroid Based Speedtest

Sometimes it would be great to have your own, independent speed-test service to test performance inside your network. In this article, I look at a free speed-test utility that can be installed onto an Odroid platform so you can have your very own network speed-test service.

Background

Back in February 2017, I attended the Wireless LAN Pros conference in Phoenix. Among the many interesting sessions provided was a “maker” session where we all got to build a whiz-bang gizmo based on an Odroid computer board. This is quite similar to a Raspberry Pi, that you may be more familiar with, but it has a bit more processing horsepower and, most importantly, a gigabit Ethernet connection, rather than being limited to the 100mbps of a Pi.

Among the many features that the Odroid provided for us was speed-test software from OpenSpeedtest.com. I’m sure you’ll be familiar with this type of service is you’ve used Speedtest.net or some other similar web-based speed testing utility. You simply browse to the speed test service, hit a button and a series of tests are run to test your upload and download speeds.

Many organizations tend to use web-based speed-test services as a test in situations when “there’s a problem on the wireless network”. It can provide a quick check of the end user wireless experience. Unfortunately, this approach is fundamentally flawed as a test of wireless connectivity. As it’s hosted on a service across the Internet, it’s subject to the potential challenges and inconsistencies of an organization’s Internet pipe or the target service itself (no, it might not be the wireless after all!).

There are other test utilities such as iperf3 that can probably do a slightly better job for us techies, but for a quick and easy test that users can easily perform with no additional software, a browser-based speed-test service is massively convenient.

The reason I was interested in the Odroid-based speed test is that it provides the opportunity to host your own speed test service within your own network. This obviously cuts out the variables introduced by having to traverse the Internet and therefore provides a better test of your local network infrastructure. The Odroid is a reasonably capable piece of hardware and comes with a very reasonable price-tag.

Although the pre-installed OpenSpeedtest.com utility on the Odroid supplied at WLPC is great, it has a slight drawback as it requires that the user has access to the Internet to pull various browser components from the OpenSpeedtest site itself to function. This could be an issue in scenarios such as:

  • Genuine issues with the Internet connection, making it difficult to get the required components from the speed-test site
  • Trying to test a guest environment for an unauthenticated session
  • Lab and other isolated environments
  • The speed-test service itself has issues, which is difficult to verify

Having your own speed-test service is quite desirable, as there is far more control over the server and the target zone of any fault detected is significantly reduced compared to an Internet based service. If there is an issue detected with your own hosted speed-test service, it’s more likely that the issue IS on your network.

One other side-benefit is that there are no ads on your own hosted service.

Installing The Files

To achieve a speed-test service that could be hosted on our trusty Odroid platform, I had a dig around on GitHub and found a very nice project from Federico Dossena that is a HTML5 speed-test project. This means it will work on most modern mobile devices (all the tablets & phones I’ve tested worked OK). All the hard work to bring you this utility has been done by Federico and the contributors to the project, so I can’t take any credit for this great resource.

To get it going, it’s pretty much just a matter of copying the correct files to the webserver directory of the Odroid and pointing your browser at it.

Here are the steps you’ll need to carry out. I’ve wrapped the required files up into a consolidated mini distribution for ease of use, but they’re all available from the project site.

  1. Download this zip file which is an archive with all of the files you’ll need: download
  2. Unzip the file. This will create a folder called “speedtest”
  3. Use scp to copy the ‘speedtest’ folder to the ‘/var/www’ folder of your Odroid (the login details of your Odroid are shown on its screen)

That’s it!

Now browse to “http://<Odroid IP>/speedtest”. You should see the screen below.  I’m sure you will be able to figure out how to use it from this point onwards.

speedtest.png

Considerations

If you deploy this on a live network, it’s worth remembering that its performance is going to be impacted if it’s being constantly thrashed by hordes of disgruntled users. But, as an occasional testing service, it's more than capable, particularly for wireless users who are likely to be hitting it at lower speeds than an average wired user.

Many people reading this article who don’t have an Odroid are probably wondering: “Hmmm…can I run this on my <insert Linux based device>?”. It’s very likely this would run up on pretty much anything that has an Apache web server and PHP Installed. One caveat to remember is that the results achievable will be limited by the horsepower of your device, particularly its Ethernet port speed (e.g. Raspberry Pi will top out at 100mbps). According to docs on the project web site, you may also have to tweak the Apache web server to allow large file uploads, as this may be restricted by default.

I hope you have fun with this. If you do deploy it on a network though, don’t forget to secure the platform and keep it up to date (don’t just stick it in a comms rack and forget about it…).

References