# Too many small segments getting created

**URL:** <https://discuss.elastic.co/t/too-many-small-segments-getting-created/233433>\
**Category:** Elasticsearch\
**Created:** [May 20, 2020, 1:25am UTC](https://discuss.elastic.co/t/too-many-small-segments-getting-created/233433 "2020-05-20T01:25:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravitandur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravitandur/32/4568_2.png) [@ravitandur](https://discuss.elastic.co/u/ravitandur)\
**Post date:** [May 20, 2020, 1:25am UTC](https://discuss.elastic.co/t/too-many-small-segments-getting-created/233433/1 "2020-05-20T01:25:29Z")

</div>

We are using most of the default settings and increased the refresh interval to 30 sec.  
We are observing too many small segments are getting created. Can you please let us know what might be issue for creating too many small segments. Also, as because of too many small segments merging is happening continuously and CPU is almost above 90% on hot nodes. This is very critical issue for us and any help to identify the root case is much appreciated . Thanks Ravi

---

<div class="post-metadata">

**Author:** ![robhuang](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@robhuang](https://discuss.elastic.co/u/robhuang)\
**Post date:** [May 20, 2020, 3:31am UTC](https://discuss.elastic.co/t/too-many-small-segments-getting-created/233433/2 "2020-05-20T03:31:05Z")

</div>

do you see this to all indices or just to a specific index? did u set refresh\_interval at cluster level?

---

<div class="post-metadata">

**Author:** ![ravitandur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravitandur/32/4568_2.png) [@ravitandur](https://discuss.elastic.co/u/ravitandur)\
**Post date:** [May 20, 2020, 4:39am UTC](https://discuss.elastic.co/t/too-many-small-segments-getting-created/233433/3 "2020-05-20T04:39:40Z")

</div>

for most of indices we are seeing this issue. refresh interval set in default mapping which will be applicable to all indices. Please find the index settings applied for a index:

```
  "index" : {
    "refresh_interval" : "30s",
    "translog" : {
      "sync_interval" : "30s",
      "durability" : "async"
    },
    "auto_expand_replicas" : "false",
    "provided_name" : "log_instance-demo-2020.05.20",
    "creation_date" : "1589932961715",
    "priority" : "100",
    "number_of_replicas" : "0",
    "uuid" : "E1Jyyi-xTKiSH-jyuVCWFQ",
    "version" : {
      "created" : "7040299"
    },
    "lifecycle" : {
      "name" : "log_h_w2_d4"
    },
    "codec" : "best_compression",
    "routing" : {
      "allocation" : {
        "require" : {
          "box_type" : "hot"
        }
      }
    },
    "number_of_shards" : "6"
  }
```

---

<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 17, 2020, 4:39am UTC](https://discuss.elastic.co/t/too-many-small-segments-getting-created/233433/4 "2020-06-17T04:39:48Z")

</div>

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