跳转到主要内容

Elasticsearch的宏基准测试框架

项目描述

Rally logo

基准测试

基准测试是Elasticsearch的宏观基准测试框架

什么是基准测试?

您想对Elasticsearch进行基准测试?那么基准测试就是为您准备的。它可以帮助您完成以下任务

  • 为基准测试设置和拆卸Elasticsearch集群
  • 管理基准数据和规范,即使跨越Elasticsearch版本
  • 运行基准测试并记录结果
  • 通过附加所谓的遥测设备来查找性能问题
  • 比较性能结果

我们在基准测试中也投入了大量精力,以确保基准测试数据可重复。

快速入门

基准测试是为Unix开发的,并且在Linux和macOS上进行了积极的测试。基准测试支持在Windows上运行的Elasticsearch集群的基准测试,但基准测试本身需要安装在运行Unix的机器上。

安装基准测试

注意:如果您正在积极开发Elasticsearch,我们建议您以开发模式安装基准测试,因为Elasticsearch发展迅速,基准测试始终适应最新的主要版本。

安装Python 3.8+包括pip3、git 1.9+以及运行Elasticsearch所需的适当的JDK。请确保JAVA_HOME指向该JDK。然后运行以下命令,如果需要,可以以sudo开头

pip3 install esrally

如果您有任何问题或需要更多详细说明,请参阅详细安装指南

运行您的第一次比赛

现在我们准备好运行第一次比赛了

esrally race --distribution-version=6.0.0 --track=geonames

这将下载Elasticsearch 6.0.0并对其运行Rally的默认赛道 - geonames赛道 - 比赛结束后,摘要报告将写入命令行

------------------------------------------------------
    _______             __   _____
   / ____(_)___  ____ _/ /  / ___/_________  ________
  / /_  / / __ \/ __ `/ /   \__ \/ ___/ __ \/ ___/ _ \
 / __/ / / / / / /_/ / /   ___/ / /__/ /_/ / /  /  __/
/_/   /_/_/ /_/\__,_/_/   /____/\___/\____/_/   \___/
------------------------------------------------------

|                         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)
----------------------------------

获取帮助

如何贡献

请参阅贡献指南中的所有详细信息。

许可证

本软件根据以下引用的Apache许可证2.0("ALv2")许可。

版权所有2015-2021 Elasticsearch https://elastic.ac.cn

根据Apache许可证版本2.0("许可证")许可;除非遵守许可证,否则不得使用此文件。您可以在以下位置获得许可证副本:

https://apache.ac.cn/licenses/LICENSE-2.0

除非适用法律要求或书面同意,否则在许可证下分发的软件以“现状”为基础分发,不提供任何形式的明示或暗示保证。有关许可证的具体语言、许可和限制,请参阅许可证。

项目详情


发布历史 发布通知 | RSS订阅

下载文件

下载适用于您的平台文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分发

esrally-2.11.0.tar.gz (1.1 MB 查看哈希值)

上传时间

构建分发

esrally-2.11.0-py3-none-any.whl (295.2 kB 查看哈希值)

上传时间 Python 3

由以下赞助商支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面