Shard size increase right after rollover

I have index that

  • primaries 3
  • replicas 1
  • ilm: roll over when any primary shard reaches 50gb (hot to warm)

So when it reached to 300gb, it roll over to warm phase.
But after it roll over, size of shard increase to about to 600gb. And after some time it comes back to 300gb.

Can you explain why this happen?

That is most likely due to merging of segments in the background. Lucene, which Elasticsearch uses, creates immutable segments when refreshes are performed and data is made searchable. These periodically are merged, at which point a new segment is created holding all the data in some other segmenst. Only once this new segment has been completed are the old segments deleted, which results in periodic increases in disk usage. If you are forcemerging read-only indices down to a single segment as part of your ILM policy (good thing to do) all segments of shards will be merged, which will temporarily require twice the amount of disk space.

1 Like

Thanks for the quick reply!!
That's perfect explain for me.

After saw your reply, i could find about it on docs too.

Thank you

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