Yardstick Hazelcast Benchmarks
Yardstick Hazelcast is a set of Hazelcast Data Grid benchmarks written on top of Yardstick framework.
Yardstick Framework
Visit Yardstick Repository for detailed information on how to run Yardstick benchmarks and how to generate graphs.
The documentation below describes configuration parameters in addition to standard Yardstick parameters.
Installation
- Create a local clone of Yardstick Hazelcast repository
- Import Yardstick Hazelcast POM file into your project
- Run
mvn package
command
Provided Benchmarks
The following benchmarks are provided:
HazelcastGetBenchmark
- benchmarks atomic distributed cache get operationHazelcastPutBenchmark
- benchmarks atomic distributed cache put operationHazelcastPutGetBenchmark
- benchmarks atomic distributed cache put and get operations togetherHazelcastPutTxBenchmark
- benchmarks transactional distributed cache put operationHazelcastPutGetTxBenchmark
- benchmarks transactional distributed cache put and get operations togetherHazelcastSqlQueryBenchmark
- benchmarks distributed SQL query over cached dataHazelcastSqlQueryPutBenchmark
- benchmarks distributed SQL query with simultaneous cache updates
Writing Hazelcast Benchmarks
All benchmarks extend HazelcastAbstractBenchmark
class. A new benchmark should also extend this abstract class and implement test
method. This is the method that is actually benchmarked.
Running Hazelcast Benchmarks
Before running Hazelcast benchmarks, run mvn package
command. This command will compile the project and also will unpack scripts from yardstick-resources.zip
file to bin
directory.
Properties And Command Line Arguments
Note that this section only describes configuration parameters specific to Hazelcast benchmarks, and not for Yardstick framework. To run Hazelcast benchmarks and generate graphs, you will need to run them using Yardstick framework scripts in
bin
folder.
Refer to Yardstick Documentation for common Yardstick properties and command line arguments for running Yardstick scripts.
The following Hazelcast benchmark properties can be defined in the benchmark configuration:
-nn <num>
or--nodeNumber <num>
- Number of nodes (automatically set inbenchmark.properties
), used to wait for the specified number of nodes to start-b <num>
or--backups <num>
- Number of backups for every key-hzcfg <path>
or--hzConfig <path>
- Path to Hazelcast configuration file-hzclicfg <path>
or--hzClientConfig <path>
- Path to Hazelcast client configuration file-sb
or--syncBackups
- Flag indicating whether synchronous backups are used, asynchronous is a default-cm
or--clientMode
- Flag indicating whether Hazelcast client is used-r <num>
or--range <num>
- Range of keys that are randomly generated for cache operations-rb
or--readBackups
- Flag indicating whether backup reads are enabled or not, disabled by default
For example if we need to run 2 HazelcastNode
servers on localhost with HazelcastPutBenchmark
benchmark on localhost, with number of backups set to 1, backups are synchronous, then the following configuration should be specified in benchmark.properties
file:
SERVER_HOSTS=localhost,localhost
# Note that -dn and -sn, which stand for data node and server node, are
# native Yardstick parameters and are documented in Yardstick framework.
CONFIGS="-b 1 -sb -dn HazelcastPutBenchmark -sn HazelcastNode"
Issues
Use GitHub issues to file bugs.
License
Yardstick Hazelcast is available under Apache 2.0 Open Source license.