Table of Contents

Driver test: large file transfer speed

Rationale

Downloading a large file via HTTP provides an easy test of the complete transmit and receive datapath under a sustained high packet load. The time command can be used to verify that the expected throughput was maintained during the download.

To eliminate other potential sources of delay, the test should download the same file multiple times. On the second and subsequent downloads, the file is likely to be served direct from cache, which will eliminate any disk-related delays. Averaging the times from multiple downloads minimises noise from any transient network conditions.

A network card

Preparation

Create a 512MB file containing pseudo-random data, using e.g.:

  dd if=/dev/urandom of=512mb bs=1M count=512

Copy your pseudo-random data file to a web server on your local network.

Create an iPXE script which downloads this file multiple times, timing the download for each time other than the first. For example:

  #!ipxe
  
  imgfetch 512mb ; imgfree
  echo Starting test
  time imgfetch 512mb ; imgfree
  time imgfetch 512mb ; imgfree
  time imgfetch 512mb ; imgfree
  time imgfetch 512mb ; imgfree
  time imgfetch 512mb ; imgfree
  time imgfetch 512mb ; imgfree
  time imgfetch 512mb ; imgfree
  time imgfetch 512mb ; imgfree
  time imgfetch 512mb ; imgfree
  time imgfetch 512mb ; imgfree
  shell

Test sequence

  1. Before starting, ensure the network cable is connected to a network which provides a DHCP server and a web server which can serve your pseudo-random data file.
  2. Boot into a version of iPXE with TIME_CMD enabled.
  3. Use ifstat to identify the name of your network interface (hereafter assumed to be net0).
  4. Open the interface and obtain an IP address using dhcp net0.
  5. Boot the test script.
  6. Observe the measured times. A good result will have all times approximately the same, with a speed commensurate with the speed of the network. For example, on a gigabit network, a 512MB file should download via HTTP in 4.6 seconds.1)
1)
1000000000 bits/second equates to 119MB/s raw data rate. With a standard Ethernet MTU, each packet during the HTTP download has 66 bytes of Ethernet+IP+TCP header and 1448 bytes of data: this reduces the effective speed to 114MB/s. A 512MB file should therefore download in 4.5 seconds. iPXE's timer resolution is only 1/18s, so a result of 4.6 seconds would be fine.
dev/drvtest/speed.txt ยท Last modified: 2013/07/15 21:00 by mcb30
Recent changes RSS feed CC Attribution-Share Alike 4.0 International Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL http://ipxe.org
References to "iPXE" may not be altered or removed.