# Esrally running the same track by giving multiple laps not working

**URL:** <https://discuss.elastic.co/t/esrally-running-the-same-track-by-giving-multiple-laps-not-working/279035>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [July 19, 2021, 8:48am UTC](https://discuss.elastic.co/t/esrally-running-the-same-track-by-giving-multiple-laps-not-working/279035 "2021-07-19T08:48:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sameera\_De\_Silva](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sameera_de_silva/32/91815_2.png) [@Sameera\_De\_Silva](https://discuss.elastic.co/u/Sameera_De_Silva)\
**Post date:** [July 19, 2021, 8:48am UTC](https://discuss.elastic.co/t/esrally-running-the-same-track-by-giving-multiple-laps-not-working/279035/1 "2021-07-19T08:48:20Z")

</div>

I want to run the same track repeatedly in a loop , because I want to do the benchmark performance testing for 3 hours.

When I ran without lap count, it get completed within 30 minutes.  
However, even when I ran with below suggested laps , syntax it ends after 30 minutes .

Highly appreciate any help regarding this . Thank you.

RALLY\_LAPS=3

for lap in $(seq 1 ${RALLY\_LAPS})  
do  
nohup /usr/local/bin/esrally --track-path=/home/sadesilva/samfiles --target-hosts=https://url.tools --pipeline=benchmark-only --client-options="use\_ssl:true,verify\_certs:false,basic\_auth\_user:'username',basic\_auth\_password:'password',timeout:120" \>\> rally\_stdout.log 2\>\> rally\_stderr.log \< /dev/null &  
done

---

<div class="post-metadata">

**Author:** ![RickBoyd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rickboyd/32/80022_2.png) [@RickBoyd](https://discuss.elastic.co/u/RickBoyd)\
**Post date:** [July 19, 2021, 1:36pm UTC](https://discuss.elastic.co/t/esrally-running-the-same-track-by-giving-multiple-laps-not-working/279035/2 "2021-07-19T13:36:08Z")

</div>

Hi @Sameera_De_Silva, thanks for using Rally!

I believe the issue here is you end up running your tests concurrently with the trailing `&` in your command, as that will background the esrally task and move on to the next loop iteration.

Hope that helps,  
Rick B

---

<div class="post-metadata">

**Author:** ![Sameera\_De\_Silva](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sameera_de_silva/32/91815_2.png) [@Sameera\_De\_Silva](https://discuss.elastic.co/u/Sameera_De_Silva)\
**Post date:** [July 20, 2021, 4:53am UTC](https://discuss.elastic.co/t/esrally-running-the-same-track-by-giving-multiple-laps-not-working/279035/3 "2021-07-20T04:53:12Z")

</div>

Thank you for the suggestion I ran again without trailing & sign, however the Esrally didn't get start.

---

<div class="post-metadata">

**Author:** ![RickBoyd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rickboyd/32/80022_2.png) [@RickBoyd](https://discuss.elastic.co/u/RickBoyd)\
**Post date:** [July 20, 2021, 12:45pm UTC](https://discuss.elastic.co/t/esrally-running-the-same-track-by-giving-multiple-laps-not-working/279035/4 "2021-07-20T12:45:04Z")

</div>

Can you share `rally_stderr.log`? `rally_stdout.log` if that is empty

---

<div class="post-metadata">

**Author:** ![Sameera\_De\_Silva](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sameera_de_silva/32/91815_2.png) [@Sameera\_De\_Silva](https://discuss.elastic.co/u/Sameera_De_Silva)\
**Post date:** [July 20, 2021, 1:58pm UTC](https://discuss.elastic.co/t/esrally-running-the-same-track-by-giving-multiple-laps-not-working/279035/5 "2021-07-20T13:58:26Z")

</div>

Sure ,here attached , also I noticed that rally.log is got get created and Esrally is now running when I gave with out

 ![empty](https://us1.discourse-cdn.com/elastic/original/3X/9/9/994de7f48451c13f24c6149e995f86be94652c38.png)  
last & sign. I'll keep you posted about the status once it's finished.

---

<div class="post-metadata">

**Author:** ![Sameera\_De\_Silva](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sameera_de_silva/32/91815_2.png) [@Sameera\_De\_Silva](https://discuss.elastic.co/u/Sameera_De_Silva)\
**Post date:** [July 20, 2021, 3:40pm UTC](https://discuss.elastic.co/t/esrally-running-the-same-track-by-giving-multiple-laps-not-working/279035/6 "2021-07-20T15:40:42Z")

</div>

Thank you [RickBoyd] running without trailing & got the Esrally running . However, when I check the overall document count, and the size, it was still same as I ran once . Could you suggest was that the expected behavior ?

---

<div class="post-metadata">

**Author:** ![RickBoyd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rickboyd/32/80022_2.png) [@RickBoyd](https://discuss.elastic.co/u/RickBoyd)\
**Post date:** [July 20, 2021, 3:59pm UTC](https://discuss.elastic.co/t/esrally-running-the-same-track-by-giving-multiple-laps-not-working/279035/7 "2021-07-20T15:59:58Z")

</div>

Hard to say without more specific information, but what it seems like you're looking at is the _most recent_ race outcome, in which case that would be correct. The script, as you've written and executed it, is simply running the race 3 times, and is not expected to aggregate the stats from the overall execution.

---

<div class="post-metadata">

**Author:** ![Sameera\_De\_Silva](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sameera_de_silva/32/91815_2.png) [@Sameera\_De\_Silva](https://discuss.elastic.co/u/Sameera_De_Silva)\
**Post date:** [July 21, 2021, 10:22am UTC](https://discuss.elastic.co/t/esrally-running-the-same-track-by-giving-multiple-laps-not-working/279035/8 "2021-07-21T10:22:11Z")

</div>

I attached the track.json that I used.

> {  
> "version": 2,  
> "description": "Tutorial benchmark for Rally",  
> "indices": [  
> {  
> "name": "customrecords",  
> "body": "",  
> "types": ["docs"]  
> }  
> ],  
> "corpora": [  
> {  
> "name": "rally-tutorial",  
> "documents": [  
> {  
> "source-file": "documents.json",  
> "document-count": 12109130,  
> "uncompressed-bytes": 12258880607,  
> "target-index": "geocustom"  
> }  
> ,  
> {  
> "source-file": "samples.json",  
> "document-count": 859010,  
> "uncompressed-bytes": 523137083,  
> "target-index": "customrecords"  
> }  
> ]  
> }  
> ],  
> "schedule": [  
> {  
> "operation": {  
> "operation-type": "create-index"  
> }  
> },  
> {  
> "operation": {  
> "operation-type": "cluster-health",  
> "request-params": {  
> "wait\_for\_status": "green"  
> }  
> }  
> },  
> {  
> "operation": {  
> "operation-type": "bulk",  
> "bulk-size": 100  
> },  
> "warmup-time-period": 120,  
> "clients": 8,  
> "target-throughput": 800  
> }  
> ]  
> }

---

<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:** [August 18, 2021, 10:22am UTC](https://discuss.elastic.co/t/esrally-running-the-same-track-by-giving-multiple-laps-not-working/279035/9 "2021-08-18T10:22:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
