# Number of Segments

**URL:** https://discuss.elastic.co/t/number-of-segments/60393
**Category:** Elasticsearch
**Created:** [September 13, 2016, 2:58pm UTC](https://discuss.elastic.co/t/number-of-segments/60393 "2016-09-13T14:58:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mhughes](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@mhughes](https://discuss.elastic.co/u/mhughes)
#### Post date: [September 13, 2016, 2:58pm UTC](https://discuss.elastic.co/t/number-of-segments/60393/1 "2016-09-13T14:58:05Z")

</div>

I have daily indices. The ES guide talks about forcemerging any index without new activity down to 1 segment. Some places talk about forcemerging as being an overoptimization. The curator optimize action has "max\_num\_segments" as 2.

I feel like there is a lot of conflicting advice here. Assuming you have an index with no new activity:

- what are the benefits of merging? reduced memory? less file handles? improved search speed? all of the above?
- how much better are the benefits of merging to 1 vs merging to 2?
- is it faster to merge to 1 than 2?
- what should you merge down to? 1 segment? 2? it depends? If "it depends", depends on what? index size?

---

<div class="post-metadata">

### Author: ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)
#### Post date: [September 13, 2016, 3:18pm UTC](https://discuss.elastic.co/t/number-of-segments/60393/2 "2016-09-13T15:18:51Z")

</div>

> [@mhughes](#):
>
> what are the benefits of merging? reduced memory? less file handles? improved search speed? all of the above?

Pretty much all of the above

> [@mhughes](#):
>
> how much better are the benefits of merging to 1 vs merging to 2?

It is hard to say. I mean, it is half the number of segments but an index that gets written to constantly is going to have dozens of segments and that performs just fine for most things.

> [@mhughes](#):
>
> is it faster to merge to 1 than 2?

Slower, I think.

> [@mhughes](#):
>
> what should you merge down to? 1 segment? 2? it depends? If "it depends", depends on what? index size?

I'd do one, but only after I'm super sure I'll never write to the index again. I don't expect you'll see a huge difference between one shard and two but it might be worth testing if you are particularly concerned about performance.

---

<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: [July 5, 2017, 10:20pm UTC](https://discuss.elastic.co/t/number-of-segments/60393/3 "2017-07-05T22:20:36Z")

</div>


