Skip to content

pinghe/akka-trading-disruptor

 
 

Repository files navigation

Trading Sample with Scala and Akka.

Including performance benchmark test described in blog: http://blog.jayway.com/2010/08/10/yet-another-akka-benchmark/

=== Latest Results ===

https://github.com/patriknw/akka-sample-trading/wiki/Results


=== How to run benchmark from distribution ===

Download and unzip distribution assembly from http://github.com/patriknw/akka-sample-trading/downloads
The zip contains all jar files, including necessary dependencies.

In the scripts directory of the distribution there is a run_benchmark.sh script that can be used to launch tests.

Argument to the script is the junit test class or classes to run.
./run_benchmark.sh org.samples.trading.akka.AkkaPerformanceTest

There is also a script for running all benchmark tests.
./run_all_benchmarks.sh

You need to define JAVA_HOME for JDK6, if you don't have it as default.

Benchmark options can be defined with variable:
export BENCH_PROPS='-Dbenchmark.useTxLogFile=false -Dbenchmark=true -Dbenchmark.minClients=1 -Dbenchmark.maxClients=40 -Dbenchmark.useDummyOrderbook=false'

Better accuracy (running tests longer) is achieved if you define jvm parameter:
-Dbenchmark=true

By default the benchmark is run without transaction logging, you can use transaction logging by defining jvm parameter:
-Dbenchmark.useTxLogFile=true

By default the benchmark is run with 1 to 40 client threads, you can define another range with jvm parameters:
-Dbenchmark.minClients=2 -Dbenchmark.maxClients=6

To push the message passing to the limits, the order matching logic can be turned off with jvm parameter:
-Dbenchmark.useDummyOrderbook=true

To control how long the tests are running you can define repeatFactor, default is 150 when benchmark=true:
-Dbenchmark.repeatFactor=300

To control the length of the warmup period you can define warmupRepeatFactor, default is 200 when benchmark=true:
-Dbenchmark.warmupRepeatFactor=300

To avoid timeouts when running the benchmarks under circumstances where execution is slowed (e.g., when using an invasive profiler) you can define timeDilation, default is 1 (higher values increase the timeout):
-Dbenchmark.timeDilation=1

Results, including charts are by default stored in directory 'target/benchmark', but can be specified with jvm parameter
-Dbenchmark.resultDir=results

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 96.3%
  • Shell 2.8%
  • Java 0.9%