# \[esrally\] The principle of esrally to test the performance of elasticsearch?

**URL:** <https://discuss.elastic.co/t/esrally-the-principle-of-esrally-to-test-the-performance-of-elasticsearch/57640>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [August 10, 2016, 2:31am UTC](https://discuss.elastic.co/t/esrally-the-principle-of-esrally-to-test-the-performance-of-elasticsearch/57640 "2016-08-10T02:31:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![laoyang360](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@laoyang360](https://discuss.elastic.co/u/laoyang360)\
**Post date:** [August 10, 2016, 2:31am UTC](https://discuss.elastic.co/t/esrally-the-principle-of-esrally-to-test-the-performance-of-elasticsearch/57640/1 "2016-08-10T02:31:57Z")

</div>

Now, your know, I already installed esrally successfully.  
I want to know the principle of esrally.

As far as I know, from the running logs,  
Firstly, esrally running as "building from source", and download the newest elasticsearch from [elastic.co](http://elastic.co).  
Secondly, esrally will running elasticsearch, elasticsearch running port is 39200( you konw, the normal elasticsearch port is 9200) send many request(including the data to building elaticsearch index)to eslaticsearch to test the performance.  
Thirdly, esrally running for a long time, Calculate and present the results.

If I said is incorrect, please let me know.  
Thank you.

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [August 10, 2016, 7:22am UTC](https://discuss.elastic.co/t/esrally-the-principle-of-esrally-to-test-the-performance-of-elasticsearch/57640/2 "2016-08-10T07:22:18Z")

</div>

Hi @laoyang360,

your understanding is almost correct.

> [@laoyang360](#):
>
> Firstly, esrally running as "building from source", and download the newest elasticsearch from [elastic.co](http://elastic.co).

You mix two things here. If you run `esrally`it assumes quite some defaults. This is the command that is actually run (spelling out all defaults explicitly):

```auto
esrally race --pipeline=from-sources-complete --revision=current --track=geonames --challenge=append-no-conflicts --car=defaults

```

The selected pipeline `from-sources-complete`advises Rally to build Elasticsearch from sources and the parameter `revision` tells it to build the currently checked out version. The only thing that is downloaded are dependencies of Elasticsearch that are needed to build it. The artifact itself is built on your machine.

In contrast to that, you can also specify a pipeline called `from-distribution`. Then Rally will not build Elasticsearch from source code but will download a binary distribution from the official download site. This is also the only way you can benchmark versions before Elasticsearch 5.0.

> [@laoyang360](#):
>
> Secondly, esrally will running elasticsearch, elasticsearch running port is 39200

This is correct. Rally chooses this port by intention in order to reduce the risk of accidentally benchmarking an already running Elasticsearch on the default port.

Daniel

---

<div class="post-metadata">

**Author:** ![laoyang360](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@laoyang360](https://discuss.elastic.co/u/laoyang360)\
**Post date:** [August 10, 2016, 9:01am UTC](https://discuss.elastic.co/t/esrally-the-principle-of-esrally-to-test-the-performance-of-elasticsearch/57640/3 "2016-08-10T09:01:23Z")

</div>

Hi, @danielmitterdorfer:  
Thanks, from what your reply, I know that:  
When I running esrally --pipline=from-distribution --distribution-version=2.3.4, Rally will download Elasticsearch from [https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.4/elasticsearch-2.3.4.tar.gz](https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.4/elasticsearch-2.3.4.tar.gz)

When I just running esrally, that equal with running  
`esrally race --pipeline=from-sources-complete --revision=current --track=geonames --challenge=append-no-conflicts --car=defaults`

In my local machine source path, I only find the follow installed information:  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/d/da7f4938fe934d87966c1e97acd81a334b2b5368.png)

So, I want to know exactly, When I just running esrally, which version of elasticsearch downloaded?  
your know, the neweset version of elasticsearch is 2.3.4.  
As far as I know, the esrally download the newest source of elasticsearch, and running it.  
When the esrally running over, the elasticsearch process killed. and the port 39200 listen over. just like:

 ![](https://us1.discourse-cdn.com/elastic/original/2X/2/2cd3de3e4f5f4e57d1d8ea243a6ef26416bc8db7.png)

Whether I thinking is correct or not? please let me know, Thanks!

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [August 10, 2016, 4:48pm UTC](https://discuss.elastic.co/t/esrally-the-principle-of-esrally-to-test-the-performance-of-elasticsearch/57640/4 "2016-08-10T16:48:47Z")

</div>

Hi @laoyang360,

> [@laoyang360](#):
>
> So, I want to know exactly, When I just running esrally, which version of elasticsearch downloaded?

It seems to me that you still mix up two _fundamentally_ different things:

1. Building from sources
2. Retrieving an official binary distribution

In the first case Elasticsearch is built from the source code, right there on your machine. Elasticsearch is _not_ downloaded, it is "created" on your machine so to speak. If you want to know the version, you can run `git rev-parse HEAD` in the source directory. It will show you the exact git hash. If you don't mean that but the Elasticsearch version it is at least some ES 5 version as Rally cannot build earlier version from sources.

Daniel

---

<div class="post-metadata">

**Author:** ![laoyang360](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@laoyang360](https://discuss.elastic.co/u/laoyang360)\
**Post date:** [August 11, 2016, 5:51am UTC](https://discuss.elastic.co/t/esrally-the-principle-of-esrally-to-test-the-performance-of-elasticsearch/57640/5 "2016-08-11T05:51:10Z")

</div>

Hi, @danielmitterdorfer:  
Thank you for your reply. I know the difference of the two method.  
One is building from source, and source address is : [https://github.com/elastic/elasticsearch](https://github.com/elastic/elasticsearch).  
And the other one is retrieving an official binary distribution which address is: [https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/zip/elasticsearch/2.3.5/elasticsearch-2.3.5.zip](https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/zip/elasticsearch/2.3.5/elasticsearch-2.3.5.zip)

My git hash is:  
[root@laoyang src]# git rev-parse HEAD  
920a21e55cbc8fcd4098c1d65a393c02d13d0245

Thank you again.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:28pm UTC](https://discuss.elastic.co/t/esrally-the-principle-of-esrally-to-test-the-performance-of-elasticsearch/57640/6 "2017-07-05T22:28:37Z")

</div>


