# Old indexes still with many segments

**URL:** <https://discuss.elastic.co/t/old-indexes-still-with-many-segments/93292>\
**Category:** Elasticsearch\
**Created:** [July 16, 2017, 8:00am UTC](https://discuss.elastic.co/t/old-indexes-still-with-many-segments/93292 "2017-07-16T08:00:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eli\_Revach](https://avatars.discourse-cdn.com/v4/letter/e/e9c0ed/32.png) [@Eli\_Revach](https://discuss.elastic.co/u/Eli_Revach)\
**Post date:** [July 16, 2017, 8:00am UTC](https://discuss.elastic.co/t/old-indexes-still-with-many-segments/93292/1 "2017-07-16T08:00:31Z")

</div>

Hi ,  
Our new index creation method is index per month ( so basically for 6 months we have 6 indexes ) . We keep 6 indexes available on the systems before we purge the old one , and only the newest is being active ingested (all other are use for search + the newest)

Looking into the index stats I still see hugh amount of segments for the old indexes . We trying to optimize our memory utilization by minimizing the amount of memory this old indexes consume (amount of segments ) , but seems like old indexes are not being auto optimizes / continuing being marge

Any configuration method exist to change this behave (We like to avoid force optimized , as we see that this process is consuming many resource ) ,

Example from our production system :

"myindex\_2017\_03"  
segments" : {  
"count" : 13003,  
"memory\_in\_bytes" : 32476621590,  
"index\_writer\_memory\_in\_bytes" : 0,  
"index\_writer\_max\_memory\_in\_bytes" : 194560000,  
"version\_map\_memory\_in\_bytes" : 0,  
"fixed\_bit\_set\_memory\_in\_bytes" : 0  
},

Thanks

---

<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:** [July 16, 2017, 9:21am UTC](https://discuss.elastic.co/t/old-indexes-still-with-many-segments/93292/2 "2017-07-16T09:21:48Z")

</div>

That is exactly what force merge is for. You can control how many target segments you are merging into, so do not necessarily go all the way down to 1.

---

<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 13, 2017, 9:22am UTC](https://discuss.elastic.co/t/old-indexes-still-with-many-segments/93292/3 "2017-08-13T09:22:20Z")

</div>

Closed on August 13, 2017, 9:22am UTC

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