Repository navigation
Five Minute Tutorial
Radargun is a framework that allows you to compare the performance of different clustering products (e.g. Infinispan, EHCache, Coherence), in different scenarios (benchmarks). It is primarily intended to stress multiple nodes of a datagrid using a homogeneous data access pattern (in other words, the framework executes the same code to access data on every node at the same time). A sequence of steps (which RadarGun calls stages) are being executed at the same time on all the nodes of the datagrid. The diagram below depicts such a benchmark:
There are no downloadable binaries at this stage. Build RadarGun by checking out sources from git, or downloading the sources as a zip file from here. Then unzip and build, using:
$ unzip radargun-*.zip
$ cd radargun
$ mvn clean install -DskipTests
This is in the conf/benchmark.xml config file for distributed benchmarks, or conf/local-benchmark.xml for non-distributed, single-node tests. Please see these files for more details on how to configure RadarGun.
Some notes about the configuration file:
- the
masterelement defines where the master process listens for connections from slaves. The master process is the one that coordinates multiple slaves for running a distributed benchmark. - the
benchmarkelement configure what stages made out the benchmark. The master coordinates all the slaves, so that each stage starts on all slaves at the same time. The attributesinitSize,maxSizeandincrementdefines the rage of slaves the benchmark will be run on. - next element,
productsspecify which product/configs are benchmarked. For each such (product,config) combo, the benchmark (described bybenchmarkelement) is run. - last section configures what reports are generated. More on this later, after we run the benchmark.
./bin/master.sh
=== Cache Benchmark Framework: master.sh ===
This script is used to launch the master process, which coordinates tests run
on slaves.
Master's PID is 37133 running on spark.local
Check that master is successfully started:
./bin/master.sh -status
Master is running, pid is 37037.
The number of slaves that need to be started is defined by maxSize attribute of benchmark element. In our example it is 4.
$ ./bin/slave.sh
=== Radargun: slave.sh ===
This script is used to launch the local slave process.
... done! Slave process started on host spark.local!
$ ./bin/slave.sh
=== Radargun: slave.sh ===
This script is used to launch the local slave process.
... done! Slave process started on host spark.local!
$ ./bin/slave.sh
=== CRadargun: slave.sh ===
This script is used to launch the local slave process.
... done! Slave process started on host spark.local!
$ ./bin/slave.sh
=== Radargun: slave.sh ===
This script is used to launch the local slave process.
... done! Slave process started on host spark.local!
Note in this example we use slave.sh that starts a process on the same machine. In real-world, you would most likely have multiple nodes running on multiple machines. For easily starting remote slave processes on remote machines, refer to benchmark.sh: this knows how to ssh on remote nodes and run slave.sh there.
At this point the benchmark is running, and it will take a while until all the benchmarks are run on all the nodes. To monitor progress run the following:
$ tail -f radargun.log
When the benchmark is finished you should see something line this:
2010-02-17 06:37:30,149 [main] INFO [org.radargun.state.MasterState] Successfully executed all benchmarks in 4 mins 35 secs, exiting.
2010-02-17 06:37:30,153 [Thread-1] INFO [org.radargun.ShutDownHook] Master process is being shutdown
All the reports are generated in the reports directory. We are interested in ./reports/*.png files: they correspond to the reports defined in the xml configuration:
$ ls reports/*.png
reports/All_GET.png reports/All_PUT.png reports/Distributed_GET.png
reports/Distributed_PUT.png reports/Replicated_GET.png reports/Replicated_PUT.png
A pair of files has been generated for each report element defined within the xml configuration. Below is Replicated_PUT.png as it was generated on my machine for this run.

The graphic contain a performance comparison between JBossCache and Infinispan, both configured for total replication. It shows performance PUT operation performance based on the number of nodes in the cluster.
Note this benchmark was run on laptop and on a small data set. A real-world benchmark would distribute the nodes on several machines over a network. Such a benchmark will be added/can be found on the infinispan blog.
For more details on how to configure and run the benchmarks go to Distributed Benchmarks and Stress Test.
RadarGun supports by default a number of products (including JBossCache, Infinispan, Oracle's Coherence) but if you want to benchmark against a new product refer to Writing Custom Plugins.
For more details on how the scripts should be used refer to Using The Scripts.
