Skip to content

Benchmarking

Richard Warburton edited this page Aug 29, 2015 · 14 revisions

Compilation

In order to compile the benchmarks JAR run: ./gradlew benchmarks

Running Codec Microbenchmarks

fix-gateway-system-tests/build/libs/fix-gateway-system-tests-0.1-SNAPSHOT-benchmarks.jar is just a standard JMH benchmark jar, so for example to run the stub decoder benchmark run:

java -jar ./fix-gateway-system-tests/build/libs/fix-gateway-system-tests-0.1-SNAPSHOT-benchmarks.jar StubDecoderBenchmark

Running Performance Tests

Run the server:

java -cp ./fix-gateway-system-tests/build/libs/fix-gateway-system-tests-0.1-SNAPSHOT-benchmarks.jar uk.co.real_logic.gateway.system_benchmarks.FixBenchmarkServer

Run the benchmark client:

java -cp ./fix-gateway-system-tests/build/libs/fix-gateway-system-tests-0.1-SNAPSHOT-benchmarks.jar uk.co.real_logic.figateway.system_benchmarks.FixBenchmarkClient

Benchmark Images on AWS

From Scratch

If you want to build an EC2 image from scratch,

  1. Pick an Ubuntu HVM image
  2. At least a c3.2xlarge
  3. Install requirements/utilities
sudo apt-get install htop screen mosh
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
  1. Upload the current benchmark directory
scp -i /path/to/pem.pem -r bench/ ubuntu@<server-address>.compute.amazonaws.com:

You can optionally upload your .screenrc

scp -i /path/to/pem.pem ~/.screenrc ubuntu@<server-address>.compute.amazonaws.com:

From an AMI

Boot the "FIX Benchmark" AMI.

Running benchmarks

  1. Re-compile and upload the benchmarks jar:
./gradlew benchmarks
scp -i /path/to/pem.pem fix-gateway-system-tests/build/libs/*-benchmarks.jar ubuntu@<server-address>.compute.amazonaws.com:bench/
  1. Run the benchmark on the EC2 image using the ./server and ./client scripts in screen.

  2. Pull down the flight recording to analyse locally.

scp -i /path/to/pem.pem ubuntu@<server-address>.compute.amazonaws.com:bench/dump.jfr .
Clone this wiki locally