Running GridGain Benchmarks on the Yardstick Benchmarking Framework
GridGain® and all other benchmarks are written on top of the Yardstick Benchmarking Framework.
Hosted On GitHub
Yardstick Framework is hosted on GitHub where you can find full documentation.
Installation
- Download the latest GridGain Community https://www.gridgain.com/resources/download
- Directory
benchmarks
contains actual yardstick build.
Benchmark Code
Here is a simple example of how classical put-get benchmarks can be implemented. Yardstick will find and load all benchmarks from the class path automatically.
package org.apache.ignite.yardstick.cache;
import java.util.Map;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.yardstick.cache.model.SampleValue;
/**
* Ignite benchmark that performs put operations.
*/
public class IgnitePutBenchmark extends IgniteCacheAbstractBenchmark {
/** {@inheritDoc} */
@Override public boolean test(Map ctx) throws Exception {
int key = nextRandom(args.range());
cache.put(key, new SampleValue(key));
return true;
}
/** {@inheritDoc} */
@Override protected IgniteCache cache() {
return ignite().cache("atomic");
}
}
Available Benchmarks
The full list of benchmarks that are already available can be found in config/benchmarks.properties file.
Running Benchmarks
Yardstick framework comes with several scripts under bin
folder. The easiest way to execute benchmarks is to start bin/benchmark-run-all.sh
script which will start remote server nodes if specified in config/benchmark.properties
file, and local benchmark driver.
To run benchmarks across a distributed cluster you have to:
- Replace
SERVER_HOSTS=localhost,localhost
toSERVER_HOSTS=ip1,ip2,...,ipN
- Comment
<property name="localHost" value="127.0.0.1"/>
in config/ignite-localhost-config.xml and add ip1....ipN to list "addresses" in config/ignite-localhost-config.xml