
Leverages the JMeter and KafkaMeter to inject into persister metric messages with permutation of random metric names and dimensions. Monitors the metrics flushed to the database in all persister instances and calculates the throughput. The number of metrics and the number of unique metic definitions are configurable in the test plan. The script currently supports only the Java implementation of the Monasca persister. Monasca python does not provide the same internal metric api as the Dropwizard in the Java implemation. Future work is required for the Python implemation. Change-Id: Id8e6a5b62aa434d9943c7eee4be8991536b1c45f Depends-On: https://review.openstack.org/543399 story: 2001292 task: 5841
monasca-persister performance benchmarking
This tool benchmarkes the Monasca Persister performance and throughput. It uses JMeter and Kafka plugin to initiate Kafka metric messages and query the Dropwizard rest api to retrieve perister processing metrics. Becasue the Monasca persister python implementation does not have similar internal processing metric rest api availalbe, the support for python implementation performance benchmark will be added in a future release.
Install
- Download and install the latest Apache JMeter from http://jmeter.apache.org/download_jmeter.cgi.
- Add JMeter bin directory to the path, for example, PATH=$PATH:/opt/apache-jmeter/bin.
- Clone KafkaMeter repository: https://github.com/BrightTag/kafkameter.
- Run Maven package and install Kafkameter jar to $JMETER_HOME/lib/ext folder under the Apache JMeter installation home.
Configure
- Make a copy of the jmeter_test_plan.jmx file and modify the test plan to fit your goal. The available options are:
- The number of threads(users)
- The number of loops, i.e., the number of metric messages each thread/user will create)
- The range of the random values in the metric name and dimension values. This controls the number of unique metric definitions the test plan will create.
The total number of metrics = the number of threads(users) * loop count.
Run test
- Execute persister_perf.sh, for example,
./persister_perf.sh -t jmeter_test_plan.jmx -n 1000000 -s 192.168.1.5,192.168.1.6 -p 8091 -w 10
-n the expected number of metric messages (equals to the number of threads(users) * loop count.
-s a comma separated list of the Monasca Persister server hosts in the cluster
-p Monasca Persister server port number
-w the time to wait for before checking the processing status from the Monasca persister next time
-
For each test run, an output folder (postfixed by the timestamp) is created. You can monitor the log file to watch the progress of jmeter sending messages, Monasca persister reading messages as well as Persister flushing the metrics into the time series database. It includes the accumulated number of metrics created, read and flushed and snapshots of throughput in each check interval.
-
The output file contains the summary of the performance testing result.