弹性搜索的宏基准框架
esrall的Python项目详细描述
Rally是ElasticSearch的宏观基准框架
什么是拉力赛?
你想基准ElasticSearch?那么拉力赛是为你准备的。它可以帮助您完成以下任务:
- ElasticSearch集群基准测试的设置和拆卸
- 即使在ElasticSearch版本中也可以管理基准数据和规范
- 运行基准并记录结果
- 通过安装所谓的遥测设备查找性能问题
- 比较性能结果
我们也在Rally上付出了相当大的努力,以确保基准数据的可重复性。
一般来说,Rally适用于从1.x开始的所有版本的ElasticSearch,但是使用插件和基准源构建进行基准测试只适用于从ElasticSearch 5.0开始的版本。
快速启动
Rally是为Unix开发的,并在Linux和MacOS上进行了积极的测试。rally支持benchmarking Elasticsearch clusters running on Windows,但rally本身需要安装在运行unix的计算机上。
安装拉力
note:如果您积极开发elasticsearch,我们建议您install Rally in development mode而不是elasticsearch,因为elasticsearch是快速移动的,rally总是根据最新的主版本进行相应的调整。
安装python 3.5+,包括pip3、git 1.9+和appropriate JDK to run Elasticsearch确保JAVA_HOME指向那个jdk。然后运行下面的命令,必要时可以选择前缀为sudo:
pip3 install esrally
如果您有任何问题或需要更详细的说明,请查看detailed installation guide。
开始第一场比赛
现在我们可以开始第一场比赛了:
esrally --distribution-version=6.0.0
这将下载ElasticSearch 6.0.0并运行Rally的默认曲目geonames track-对其进行测试。比赛结束后,将向命令行写入摘要报告:
------------------------------------------------------ _______ __ _____ / ____(_)___ ____ _/ / / ___/_________ ________ / /_ / / __ \/ __ `/ / \__ \/ ___/ __ \/ ___/ _ \ / __/ / / / / / /_/ / / ___/ / /__/ /_/ / / / __/ /_/ /_/_/ /_/\__,_/_/ /____/\___/\____/_/ \___/ ------------------------------------------------------ | Metric | Task | Value | Unit | |-------------------------------:|---------------------:|----------:|-------:| | Total indexing time | | 28.0997 | min | | Total merge time | | 6.84378 | min | | Total refresh time | | 3.06045 | min | | Total flush time | | 0.106517 | min | | Total merge throttle time | | 1.28193 | min | | Median CPU usage | | 471.6 | % | | Total Young Gen GC | | 16.237 | s | | Total Old Gen GC | | 1.796 | s | | Index size | | 2.60124 | GB | | Total written | | 11.8144 | GB | | Heap used for segments | | 14.7326 | MB | | Heap used for doc values | | 0.115917 | MB | | Heap used for terms | | 13.3203 | MB | | Heap used for norms | | 0.0734253 | MB | | Heap used for points | | 0.5793 | MB | | Heap used for stored fields | | 0.643608 | MB | | Segment count | | 97 | | | Min Throughput | index-append | 31925.2 | docs/s | | Median Throughput | index-append | 39137.5 | docs/s | | Max Throughput | index-append | 39633.6 | docs/s | | 50.0th percentile latency | index-append | 872.513 | ms | | 90.0th percentile latency | index-append | 1457.13 | ms | | 99.0th percentile latency | index-append | 1874.89 | ms | | 100th percentile latency | index-append | 2711.71 | ms | | 50.0th percentile service time | index-append | 872.513 | ms | | 90.0th percentile service time | index-append | 1457.13 | ms | | 99.0th percentile service time | index-append | 1874.89 | ms | | 100th percentile service time | index-append | 2711.71 | ms | | ... | ... | ... | ... | | ... | ... | ... | ... | | Min Throughput | painless_dynamic | 2.53292 | ops/s | | Median Throughput | painless_dynamic | 2.53813 | ops/s | | Max Throughput | painless_dynamic | 2.54401 | ops/s | | 50.0th percentile latency | painless_dynamic | 172208 | ms | | 90.0th percentile latency | painless_dynamic | 310401 | ms | | 99.0th percentile latency | painless_dynamic | 341341 | ms | | 99.9th percentile latency | painless_dynamic | 344404 | ms | | 100th percentile latency | painless_dynamic | 344754 | ms | | 50.0th percentile service time | painless_dynamic | 393.02 | ms | | 90.0th percentile service time | painless_dynamic | 407.579 | ms | | 99.0th percentile service time | painless_dynamic | 430.806 | ms | | 99.9th percentile service time | painless_dynamic | 457.352 | ms | | 100th percentile service time | painless_dynamic | 459.474 | ms | ---------------------------------- [INFO] SUCCESS (took 2634 seconds) ----------------------------------
获取帮助
- 快速帮助:^{TT5}$
- 查看Rally’s user guide了解更多信息
- 问一些关于集会的问题。
- 我们的Github repo中的文件改进或错误报告。
如何贡献
查看contributor guidelines中的所有详细信息。
许可证
此软件是根据下面引用的apache许可证版本2(“alv2”)授权的。
版权所有2015-2019 ElasticSearch<;https://www.elastic.co>;
根据apache许可证2.0版(以下简称“许可证”)授权;您不能 除非符合许可证,否则请使用此文件。您可以获得 在
http://www.apache.org/licenses/LICENSE-2.0
除非适用法律要求或书面同意,否则软件 根据许可证分发的是按“原样”分发的,而不是 明示或默示的任何形式的保证或条件。见 管理以下权限和限制的特定语言的许可证 执照。