# Esrally benchmark run with(/out) refresh\_interval param doesn't show any difference in runtime

**URL:** <https://discuss.elastic.co/t/esrally-benchmark-run-with-out-refresh-interval-param-doesnt-show-any-difference-in-runtime/321668>\
**Category:** Elasticsearch\
**Tags:** rally, runtime-fields\
**Created:** [December 20, 2022, 3:20pm UTC](https://discuss.elastic.co/t/esrally-benchmark-run-with-out-refresh-interval-param-doesnt-show-any-difference-in-runtime/321668 "2022-12-20T15:20:09Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahesh3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahesh3/32/97482_2.png) [@Mahesh3](https://discuss.elastic.co/u/Mahesh3)\
**Post date:** [December 20, 2022, 3:20pm UTC](https://discuss.elastic.co/t/esrally-benchmark-run-with-out-refresh-interval-param-doesnt-show-any-difference-in-runtime/321668/1 "2022-12-20T15:20:09Z")

</div>

I have done two benchmark runs using the esrally, one with default refresh interval and second with "refresh\_interval" set to "-1" (disabled). Both runs took same amount of time. (382 seconds)

I am hoping that second benchmark run should complete faster as there was no refresh involved.

Here are the shard stats for the refresh interval (5sec)

"refresh" : {  
"total" : 237,  
"total\_time\_in\_millis" : 75997,  
"external\_total" : 213,  
"external\_total\_time\_in\_millis" : 73532,  
"listeners" : 0  
},

Here are the shard stats (refresh interval disabled):

"refresh" : {  
"total" : 135,  
"total\_time\_in\_millis" : 59627,  
"external\_total" : 8,  
"external\_total\_time\_in\_millis" : 0,  
"listeners" : 0  
},

When the refresh interval disabled, I am not sure why "total\_time\_in\_mills" is recorded as "59627".

Thanks.

---

<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:** [December 20, 2022, 3:39pm UTC](https://discuss.elastic.co/t/esrally-benchmark-run-with-out-refresh-interval-param-doesnt-show-any-difference-in-runtime/321668/2 "2022-12-20T15:39:11Z")

</div>

Hi @Mahesh3, can you share your whole invocation? We may be able to give some idea then

---

<div class="post-metadata">

**Author:** ![json](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/json/32/4125_2.png) [@json](https://discuss.elastic.co/u/json)\
**Post date:** [December 20, 2022, 3:49pm UTC](https://discuss.elastic.co/t/esrally-benchmark-run-with-out-refresh-interval-param-doesnt-show-any-difference-in-runtime/321668/3 "2022-12-20T15:49:07Z")

</div>

Hi Mahesh, welcome to the Elastic community!

Disabling refresh allows Elasticsearch to fill its entire [indexing buffer](https://www.elastic.co/guide/en/elasticsearch/reference/current/indexing-buffer.html) during indexing. Refreshes are triggered when the buffer is full and it is time to write segments to disk.

Search requests will also trigger a refresh.

Thank you,  
Jason

---

<div class="post-metadata">

**Author:** ![Mahesh3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahesh3/32/97482_2.png) [@Mahesh3](https://discuss.elastic.co/u/Mahesh3)\
**Post date:** [December 23, 2022, 1:55am UTC](https://discuss.elastic.co/t/esrally-benchmark-run-with-out-refresh-interval-param-doesnt-show-any-difference-in-runtime/321668/4 "2022-12-23T01:55:15Z")

</div>

Hi Jason,

There were no search requests, just only bulk-indexing.

I have added the ""indices.memory.index\_buffer\_size" (=50%, also 100%) to elasticsearch config file , also set the heap size to 8GB (32GB RAM machine), and tried the esrallly run with refresh interval disabled, I didn't see any improvements in run timings.

Not sure exactly what else should be done speed up the indexing speed.

Here are esrally command for my test:

`esrally race --preserve-install --distribution-version=7.16.0 --track=eventdata --track-repository=eventdata --challenge=index-logs-fixed-daily-volume --track-params="index_prefix:'test12',bulk_indexing_clients:12,number_of_shards:4,daily_logging_volume:'3GB',number_of_days:1,refresh_interval:'-1'"`

Thanks,  
Mahesh

---

<div class="post-metadata">

**Author:** ![Mahesh3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahesh3/32/97482_2.png) [@Mahesh3](https://discuss.elastic.co/u/Mahesh3)\
**Post date:** [December 23, 2022, 4:34am UTC](https://discuss.elastic.co/t/esrally-benchmark-run-with-out-refresh-interval-param-doesnt-show-any-difference-in-runtime/321668/5 "2022-12-23T04:34:29Z")

</div>

Hi Rick.

It's a three step to run the test that I am following:

1. Esrally install - to install the elastic
2. Esrally start - to start the elasticsearch (before starting, edit the elasticsearch and jvm to add the respective parameters)
3. Esrally race run , below command and it's params.

```auto

esrally race --preserve-install --distribution-version=7.16.0 --track=eventdata --track-repository=eventdata --challenge=index-logs-fixed-daily-volume --track-params="index_prefix:'test12',bulk_indexing_clients:12,number_of_shards:4,daily_logging_volume:'3GB',number_of_days:1,refresh_interval:'-1'"

```

Thanks,  
Mahesh

---

<div class="post-metadata">

**Author:** ![dliappis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dliappis/32/56174_2.png) [@dliappis](https://discuss.elastic.co/u/dliappis)\
**Post date:** [December 23, 2022, 8:39am UTC](https://discuss.elastic.co/t/esrally-benchmark-run-with-out-refresh-interval-param-doesnt-show-any-difference-in-runtime/321668/6 "2022-12-23T08:39:36Z")

</div>

> [@Mahesh3](#):
>
> I have done two benchmark runs using the esrally, one with default refresh interval and second with "refresh\_interval" set to "-1" (disabled). Both runs took same amount of time. (382 seconds)
> 
> I am hoping that second benchmark run should complete faster as there was no refresh involved.

If there are no search requests issued, using default settings, Elasticsearch will not periodically refresh, see the [docs](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-refresh.html#refresh-api-desc).

Therefore there shouldn't be any performance difference between indexing with an explicit setting of `index.refresh_internal` to `-1` or using the defaults.

_EDIT_  
That said, if are talking specifically about the eventdata track, the default setting for refresh\_internal is `5s`: [GitHub - elastic/rally-eventdata-track: Rally track for simulating event-based data use-cases](https://github.com/elastic/rally-eventdata-track#track-parameters-supported-by-all-challenges) . If you aren't seeing a diff in indexing throughput I'd suggest you take a look at your methodology and esp. whether there are other bottlenecks (e.g. is the loaddriver, perhaps, saturated?)

The command you provided [earlier](https://discuss.elastic.co/t/esrally-benchmark-run-with-out-refresh-interval-param-doesnt-show-any-difference-in-runtime/321668/5) indicates that the loaddriver is running on the same machine where Elasticsearch is, which is an anti-pattern for benchmarking. I recommend watching the [7 deadly sins of benchmarking](https://www.elastic.co/elasticon/conf/2018/sf/the-seven-deadly-sins-of-elasticsearch-benchmarking) video to avoid some common pitfalls).

---

<div class="post-metadata">

**Author:** ![Mahesh3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahesh3/32/97482_2.png) [@Mahesh3](https://discuss.elastic.co/u/Mahesh3)\
**Post date:** [December 24, 2022, 2:29am UTC](https://discuss.elastic.co/t/esrally-benchmark-run-with-out-refresh-interval-param-doesnt-show-any-difference-in-runtime/321668/7 "2022-12-24T02:29:15Z")

</div>

Yes, I aware that elasticsearch and benchmark test shouldn't be on same instance. This is just a. basic test to evaluate performance on very small dataset. In actual benchmark test, elasticsearch and esrally client nodes are on two different instance.

My understanding is that when the refersh is disabled , there should be at least 1% of performance improvement. But, that's not happening.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 24, 2022, 5:59am UTC](https://discuss.elastic.co/t/esrally-benchmark-run-with-out-refresh-interval-param-doesnt-show-any-difference-in-runtime/321668/8 "2022-12-24T05:59:58Z")

</div>

> [@Mahesh3](#):
>
> My understanding is that when the refersh is disabled , there should be at least 1% of performance improvement. But, that's not happening.

The refresh interval used to have a significant mpact in older versions of Elasticsearch, but due to improvements in newer versions this is not necessarily always the case any longer.

---

<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:** [January 21, 2023, 6:00am UTC](https://discuss.elastic.co/t/esrally-benchmark-run-with-out-refresh-interval-param-doesnt-show-any-difference-in-runtime/321668/9 "2023-01-21T06:00:24Z")

</div>

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