esrally安装
安装过程,在《ElasticSearch 性能测试工具 rally esrally 【译】》这篇文章里面,进行了描述。期间也遇到了一个小问题,解决并不难,主要是因为还不熟悉python导致的《ImportError: No module named bz2错误解决方法》。
最主要就是准备环境Python 3.4+,包含 pip3, JDK 8以及git 1.9+,还有gradle(不编译es代码,就不需要装)。安装esrally不过一条语句的事:pip3 install esrally。
esrally测试
1、Tracks列表
esrally list tracks
2、下载基测数据
默认执行geonames track需要下载可以自行下载数据集
189M 下载成功,这还是用同事迅雷会员下载的:
http://benchmarks.elasticsearch.org.s3.amazonaws.com/corpora/geonames/documents.json.bz2
5.5G下载不成功:
http://benchmarks.elasticsearch.org.s3.amazonaws.com/corpora/pmc/documents.json.bz2
3、压测基础数据目录
然后将下载的文件放到 /home/ss/.rally/benchmarks/data/geonames/
4、压测已存在的es环境
当已经存在Elasticsearch部署环境则可以使用--target-hosts来指定
[ss@soc bin]$ esrally --target-hosts=192.168.0.90:9200 --challenge=append-fast-no-conflicts --pipeline=benchmark-only
____ ____
/ __ \____ _/ / /_ __
/ /_/ / __ `/ / / / / /
/ _, _/ /_/ / / / /_/ /
/_/ |_|\__,_/_/_/\__, /
/____/
[INFO] Writing logs to /home/ss/.rally/benchmarks/races/2017-02-22-07-42-34/ss-rally/logs/rally_out.log
[INFO] Racing on track [geonames], challenge [append-fast-no-conflicts] and car [external]
************************************************************************
************** WARNING: A dark dungeon lies ahead of you **************
************************************************************************
Rally does not have control over the configuration of the benchmarked
Elasticsearch cluster.
Be aware that results may be misleading due to problems with the setup.
Rally is also not able to gather lots of metrics at all (like CPU usage
of the benchmarked cluster) or may even produce misleading metrics (like
the index size).
************************************************************************
****** Use this pipeline only if you are aware of the tradeoffs. ******
*************************** Watch your step! ***************************
************************************************************************
#
# LICENSE EXPIRED ON [Sunday, January 15, 2017]. IF YOU HAVE A NEW LICENSE, PLEASE
# UPDATE IT. OTHERWISE, PLEASE REACH OUT TO YOUR SUPPORT CONTACT.
#
# COMMERCIAL PLUGINS OPERATING WITH REDUCED FUNCTIONALITY
# - graph
# - Graph explore APIs are disabled
Running index-append [ 95% done]
#
# LICENSE EXPIRED ON [Sunday, January 15, 2017]. IF YOU HAVE A NEW LICENSE, PLEASE
# UPDATE IT. OTHERWISE, PLEASE REACH OUT TO YOUR SUPPORT CONTACT.
#
# COMMERCIAL PLUGINS OPERATING WITH REDUCED FUNCTIONALITY
# - graph
# - Graph explore APIs are disabled
Running index-append [100% done]
Running force-merge [100% done]
------------------------------------------------------
_______ __ _____
/ ____(_)___ ____ _/ / / ___/_________ ________
/ /_ / / __ \/ __ `/ / \__ \/ ___/ __ \/ ___/ _ \
/ __/ / / / / / /_/ / / ___/ / /__/ /_/ / / / __/
/_/ /_/_/ /_/\__,_/_/ /____/\___/\____/_/ \___/
------------------------------------------------------
| Lap | Metric | Operation | Value | Unit |
|------:|--------------------------------:|-------------:|-----------:|-------:|
| All | Indexing time | | 41.8213 | min |
| All | Merge time | | 7.48327 | min |
| All | Refresh time | | 2.17023 | min |
| All | Flush time | | 0.00188333 | min |
| All | Merge throttle time | | 1.06627 | min |
| All | Total Young Gen GC | | 65.537 | s |
| All | Total Old Gen GC | | 19.688 | s |
| All | Heap used for segments | | 29.4481 | MB |
| All | Heap used for terms | | 28.5702 | MB |
| All | Heap used for norms | | 0.0822754 | MB |
| All | Min Throughput | index-append | 9195.26 | docs/s |
| All | Median Throughput | index-append | 9566.7 | docs/s |
| All | Max Throughput | index-append | 9791.11 | docs/s |
| All | 50.0th percentile latency | index-append | 3927.21 | ms |
| All | 90.0th percentile latency | index-append | 5850.42 | ms |
| All | 99.0th percentile latency | index-append | 9456.03 | ms |
| All | 99.9th percentile latency | index-append | 13323.1 | ms |
| All | 100.0th percentile latency | index-append | 13633.8 | ms |
| All | 50.0th percentile service time | index-append | 3938.4 | ms |
| All | 90.0th percentile service time | index-append | 5910.61 | ms |
| All | 99.0th percentile service time | index-append | 9465.72 | ms |
| All | 99.9th percentile service time | index-append | 13429.2 | ms |
| All | 100.0th percentile service time | index-append | 13633.8 | ms |
| All | Min Throughput | force-merge | | ops/s |
| All | Median Throughput | force-merge | | ops/s |
| All | Max Throughput | force-merge | | ops/s |
| All | 100.0th percentile latency | force-merge | 10062.9 | ms |
[INFO] Archiving logs in /home/ss/.rally/benchmarks/races/2017-02-22-07-42-34/ss-rally/logs-geonames-append-fast-no-conflicts-external.zip
---------------------------------
[INFO] SUCCESS (took 987 seconds)
---------------------------------