Esrally Working Principles
Run Modes
- Online benchmark test
esrally --distribution-version=6.7.0
The command is described as follows:
Esrally can perform a performance test based on an Elasticsearch version if there are no Elasticsearch instances. Esrally downloads the software of the corresponding version from the Elastic official website and stores the software in the esrally directory. After that, Esrally downloads the performance test data of Elasticsearch. Once the data is downloaded to the local PC, the performance analysis is started and the result is printed.
- Offline test
esrally --pipeline=benchmark-only --target-hosts=90.90.43.202:9200, 90.90.43.204:9200, 90.90.43.206:9200, --offline
The command parameters are described as follows:
- --offline indicates an offline test.
- --pipeline = benchmark-only indicates the pipeline required for customizing a cluster. It is used only for pressure tests and does not manage Elasticsearch instances.
- --target-host indicates the cluster to be tested.
Directory Structure and Meaning
View the current directory.
pwd

After the Esrally compilation is complete, a .rally directory is generated in the root directory of the Esrally installation user. The directory structure is as follows (benchmarks and its subdirectories need to be added manually):
. ├── benchmarks │ ├── data │ │ └── geonames │ │ ├── documents.json │ │ └── documents.json.offset │ ├── races │ │ ├── 2020-09-24-02-28-11 │ │ │ └── race.json │ │ └── 2020-09-24-06-40-26 │ │ └── race.json │ ├── teams │ │ └── default │ │ └── cars │ │ └── v1 │ │ ├── 16gheap.ini │ │ ├── 1gheap.ini │ │ ├── 24gheap.ini │ │ ├── 2gheap.ini │ │ ├── 4gheap.ini │ │ ├── 8gheap.ini │ │ ├── basic-license.ini │ │ ├── dbg_non_safepoints │ │ │ └── templates │ │ │ └── config │ │ │ └── jvm.options │ │ ├── debug-non-safepoints.ini │ │ ├── default_distro │ │ │ ├── config.ini │ │ │ └── templates │ │ │ └── config │ │ │ └── elasticsearch.yml │ │ ├── defaults.ini │ │ ├── ea │ │ │ └── templates │ │ │ └── config │ │ │ └── jvm.options │ │ ├── ea.ini │ │ ├── fp │ │ │ └── templates │ │ │ └── config │ │ │ └── jvm.options │ │ ├── fp.ini │ │ ├── g1gc.ini │ │ ├── parallelgc.ini │ │ ├── trial-license.ini │ │ ├── unpooled │ │ │ └── templates │ │ │ └── config │ │ │ └── jvm.options │ │ ├── unpooled.ini │ │ ├── vanilla │ │ │ ├── config.ini │ │ │ ├── README.md │ │ │ └── templates │ │ │ └── config │ │ │ ├── elasticsearch.yml │ │ │ ├── jvm.options │ │ │ └── log4j2.properties │ │ ├── x_pack │ │ │ ├── base │ │ │ │ ├── ca │ │ │ │ │ ├── ca.crt │ │ │ │ │ └── ca.key │ │ │ │ └── config.py │ │ │ ├── ml │ │ │ │ └── templates │ │ │ │ └── config │ │ │ │ └── elasticsearch.yml │ │ │ ├── monitoring │ │ │ │ └── templates │ │ │ │ └── config │ │ │ │ └── elasticsearch.yml │ │ │ ├── README.md │ │ │ └── security │ │ │ └── templates │ │ │ └── config │ │ │ ├── elasticsearch.yml │ │ │ ├── log4j2.properties │ │ │ ├── role_mapping.yml │ │ │ ├── roles.yml │ │ │ ├── users │ │ │ └── users_roles │ │ ├── x-pack-ml.ini │ │ ├── x-pack-monitoring-http.ini │ │ ├── x-pack-monitoring-local.ini │ │ └── x-pack-security.ini │ └── tracks │ └── default │ └── geonames │ ├── challenges │ │ └── default.json │ ├── files.txt │ ├── index.json │ ├── operations │ │ └── default.json │ ├── __pycache__ │ │ └── track.cpython-37.pyc │ ├── README.md │ ├── terms.txt │ ├── track.json │ └── track.py ├── logging.json ├── logs │ ├── rally.log │ ├── rally.log.2020-09-22 │ └── rally.log.2020-09-23 └── rally.ini
- benchmarks/genonames/data/: stores data.
- benchmarks/races: stores results. This directory is automatically generated after the program is executed.
- benchmarks/teams/default/cars/: stores the items for the pressure test. This directory has been prepared by the system.
- benchmarks/tracks/default/genonames/: stores the tracks which define the rules and policies of the performance pressure test.
- logging.json: log parameters
- logs/*: run logs
- rally.ini: configuration parameter of Esrally