# Refresh\_interval less than 1 per second?

**URL:** <https://discuss.elastic.co/t/refresh-interval-less-than-1-per-second/286069>\
**Category:** Elasticsearch\
**Created:** [October 6, 2021, 8:31pm UTC](https://discuss.elastic.co/t/refresh-interval-less-than-1-per-second/286069 "2021-10-06T20:31:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vadym](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@Vadym](https://discuss.elastic.co/u/Vadym)\
**Post date:** [October 6, 2021, 8:31pm UTC](https://discuss.elastic.co/t/refresh-interval-less-than-1-per-second/286069/1 "2021-10-06T20:31:23Z")

</div>

Hi guys,

We are syncing data from Couchbase into Elasticsearch via CBES connector and have up to ~550ms delay from CBES inserting data into ES.

Afterwards it takes up to 2 seconds for data to become searchable in ES.

Do I understand correctly that there is unavoidable delay of up to 1 second from the refresh\_interval index setting? Can refresh\_interval be set to less than 1 second?

The goal is to decrease latency between data being inserted in Couchbase and appearing for search in Elasticsearch.

---

<div class="post-metadata">

**Author:** ![Vadym](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@Vadym](https://discuss.elastic.co/u/Vadym)\
**Post date:** [October 6, 2021, 11:37pm UTC](https://discuss.elastic.co/t/refresh-interval-less-than-1-per-second/286069/2 "2021-10-06T23:37:05Z")

</div>

I've applied 200ms refresh\_interval to an index in test env. Are we going to have any adverse effects in a big indexes? How low can it go realistically?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [October 7, 2021, 1:09am UTC](https://discuss.elastic.co/t/refresh-interval-less-than-1-per-second/286069/3 "2021-10-07T01:09:34Z")

</div>

I don't think is there is a lower limit, but the refresh interval can have a huge impact in the indexing performance and in the overall performance.

For example, when you have indexing performance issues, one of the recommendations is to increase the refresh interval.

So yes, using small refresh interval can have adverse effects, I would say that anything lower than the default 1s would not be recommended.

But you will need to try it out and see if it works for you.

---

<div class="post-metadata">

**Author:** ![Vadym](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@Vadym](https://discuss.elastic.co/u/Vadym)\
**Post date:** [October 7, 2021, 2:30am UTC](https://discuss.elastic.co/t/refresh-interval-less-than-1-per-second/286069/4 "2021-10-07T02:30:08Z")

</div>

Thank you Leandro,

Do you know someone running refresh\_interval lower than 1/s in Production? I'll start lowering it by 100-200ms increments and see if load is acceptable.

Can you suggest which parameters should I monitor after decreasing this parameter? To check for any adverse effects.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 11, 2021, 12:51am UTC](https://discuss.elastic.co/t/refresh-interval-less-than-1-per-second/286069/5 "2021-10-11T00:51:26Z")

</div>

> [@leandrojmp](#):
>
> So yes, using small refresh interval can have adverse effects, I would say that anything lower than the default 1s would not be recommended.

A big +1 to this.

---

<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:** [October 11, 2021, 7:00am UTC](https://discuss.elastic.co/t/refresh-interval-less-than-1-per-second/286069/6 "2021-10-11T07:00:09Z")

</div>

In addition to altering the refresh interval you can also set a parameter per request to refresh once the request has completed. This however genarally has a huge impact on indexing throughpout as it results in a lot of additional processing, disk I/O and a lot of very small segments that need to be merged. I assume this would also negatively affect search performance. I would expect setting a very short refresh interval to have similar effects.

---

<div class="post-metadata">

**Author:** ![Vadym](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@Vadym](https://discuss.elastic.co/u/Vadym)\
**Post date:** [October 11, 2021, 5:06pm UTC](https://discuss.elastic.co/t/refresh-interval-less-than-1-per-second/286069/7 "2021-10-11T17:06:31Z")

</div>

And only way to assess negative performance impact is by trial? If I have some resources to spare should it work reliably and only adverse effect is performance degradation?

---

<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:** [October 11, 2021, 5:46pm UTC](https://discuss.elastic.co/t/refresh-interval-less-than-1-per-second/286069/8 "2021-10-11T17:46:17Z")

</div>

I do not know if that is the only downside or not.

---

<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:** [November 8, 2021, 5:46pm UTC](https://discuss.elastic.co/t/refresh-interval-less-than-1-per-second/286069/9 "2021-11-08T17:46:32Z")

</div>

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