Skip to content

Instantly share code, notes, and snippets.

@fwessels
Created March 21, 2019 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fwessels/327bc68951835c81c39663173f209843 to your computer and use it in GitHub Desktop.
Save fwessels/327bc68951835c81c39663173f209843 to your computer and use it in GitHub Desktop.
Throughput utility

Throughput Measurement Utility

# ./throughput 
NAME:
  throughput - HTTP throughput benchmark

USAGE:
  throughput [global options] command [command options] [arguments...]

VERSION:
  0.0.0

COMMANDS:
  client   run client
  server   run server
  help, h  Shows a list of commands or help for one command

GLOBAL FLAGS:
  --help, -h     show help
  --version, -v  print the version

Server flags

$ ./throughput server --help
NAME:
  throughput server - run server

USAGE:
  throughput server [command options] [arguments...]

FLAGS:
  --port value  port (default: "8000")
  --devnull     data not written/read to/from disks
  --directio    bypass kernel cache for writes and reads
  --help, -h    show help

Basic Operation

Start utility on server using directio

$ ./throughput server --directio --port 8000

Start utility on test client, replace serverip as needed (for duration of 30 seconds). Also change the /mnt/disk{1..16]/ to the appropriate path where the NVMe disks are mounted.

$ ./throughput client --server http://serverip:8000 --duration 30 /mnt/disk{1..16}/object{1..100}
Write speed:  XXX MB
Read speed:   yyy MB

As per above both Write and Read speeds are reported.

Experiments to do

  • Run server without the --directio flags
  • Change the number of objects, eg. to 1000
  • (Current block size is 4 MB, we may want to make this larger)

Test without using the network

Leave out the --server flag in order to test and add --directio for local testing performance.

$ ./throughput client --directio --duration 30 /mnt/disk{1..16}/object{1..100}
Write speed:  XXX MB
Read speed:   yyy MB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment