# Refresh\_interval and segment size

**URL:** <https://discuss.elastic.co/t/refresh-interval-and-segment-size/305011>\
**Category:** Elasticsearch\
**Created:** [May 18, 2022, 2:43am UTC](https://discuss.elastic.co/t/refresh-interval-and-segment-size/305011 "2022-05-18T02:43:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hechangqin](https://avatars.discourse-cdn.com/v4/letter/h/9de0a6/32.png) [@hechangqin](https://discuss.elastic.co/u/hechangqin)\
**Post date:** [May 18, 2022, 2:43am UTC](https://discuss.elastic.co/t/refresh-interval-and-segment-size/305011/1 "2022-05-18T02:43:52Z")

</div>

Hi Elastic Team. In my current cluster, `refresh_interval` is set to `5m` , cluster jvm heap memory is `8g` , index.buffer defaults to `10%` , but when I continue to index, I still find very small segments, such as a few `kb` . According to my understanding the refresh mechanism should not generate such a small segment, why is it?

---

<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:** [May 18, 2022, 3:11am UTC](https://discuss.elastic.co/t/refresh-interval-and-segment-size/305011/2 "2022-05-18T03:11:02Z")

</div>

Welcome to our community! 😃

> [@hechangqin](#):
>
> According to my understanding the refresh mechanism should not generate such a small segment, why is it?

It'll create whatever size segment that it needs based on the data that is being ingested - [Near real-time search | Elasticsearch Guide [8.2] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.2/near-real-time.html) goes into the process a bit more.

---

<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:** [June 15, 2022, 3:11am UTC](https://discuss.elastic.co/t/refresh-interval-and-segment-size/305011/3 "2022-06-15T03:11:40Z")

</div>

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