# Elasticsearch/Lucene Segment Count and Merge Settings

**URL:** <https://discuss.elastic.co/t/elasticsearch-lucene-segment-count-and-merge-settings/267540>\
**Category:** Elasticsearch\
**Created:** [March 17, 2021, 3:36pm UTC](https://discuss.elastic.co/t/elasticsearch-lucene-segment-count-and-merge-settings/267540 "2021-03-17T15:36:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bikas\_Chhetri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bikas_chhetri/32/85703_2.png) [@Bikas\_Chhetri](https://discuss.elastic.co/u/Bikas_Chhetri)\
**Post date:** [March 17, 2021, 3:36pm UTC](https://discuss.elastic.co/t/elasticsearch-lucene-segment-count-and-merge-settings/267540/1 "2021-03-17T15:36:38Z")

</div>

I have a couple of questions on elastic search segment size, count, and disk flush/write.

**Scheduled Merge policy Settings**

We have about 16 GB of data in a single shard and a total of 1458014 documents across 3 shards. Each shard has 100-150 segments. Which I assume is high for a 16 GB shard and this could be one of the reasons our search response time is high(~300-500ms and p99 -\> 700-800ms).

I am aware that I can trigger force merge or run full indexing to reduce the number of segments. But, are there any settings I can change in the scheduled merge policy? So that segment count is reduced to say ~20-30 max? If there are such settings, what is the performance impact of the same?

**Segment Size**

what size segment ES creates by default? Is there a way to tweak this number?

**Hard Commit Interval**

Is there a setting in ES to configure the disk write interval? like what we have in Solr(Commit/Hard commit)?

**Force Merge**

If my shard size is 16 GB and I chose to go for force merge with max\_num\_segments = 16. Does that mean I get 16 segments of 1 GB each?

---

<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:** [April 14, 2021, 3:37pm UTC](https://discuss.elastic.co/t/elasticsearch-lucene-segment-count-and-merge-settings/267540/2 "2021-04-14T15:37:13Z")

</div>

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