Total store size of index with only one shard and one replica is three times the size of primary

Is there any kind of background task that would reduce the total number of segments increasing the total store size while leaving the respective primary values unaffected, as shown in the graphs?

Version: 6.8.0

the background task happening is a so-called merge. See

Just to rule this out, are there any open scroll contexts or snapshots going on that might leave files open?

Hello Alexander. Thank you for the quick reply. The response of GET _cluster/pending_tasks is "tasks" : [ ]. I have not used the scroll API on that index and have not provided an external API for anyone else to do so. The latest snapshot was taken on 2019-08-19.

Any chance you can share the output of

GET _stats?human

Of course. All: and the index in question:

can you also include some more parameters to get more stats for that index

GET your_index/_stats?human&level=shards&include_segment_file_sizes=true


Sure. Thank you!

@kmousikos can you try running _flush&force=true&wait_if_ongoing=true followed by an _refresh and see if the issue persists

1 Like

Flushing the index solved the issue. Thank you very much for the assistance @s1monw .

1 Like

@kmousikos thanks for the feedback. I tried to address this to be less trappy here:

thanks for reporting this issue on the forum. I think we used to have protection for this in the past but it seemed to be a regression.

@s1monw my pleasure. Thanks for the support. Just for documentation completeness, I observed the same thing on that same index the following day, only that time the size of the primary was ~10GB (double the actual data) and the total size was ~15GB. After flushing again it returned to normal (5GB and 10GB) and has not displayed that behaviour since (it now is at 6.4GB, 12.7GB)

got it! I think it's the same issue. It's inconvenient for sure. Lets see if we can easily fix / address it to happen automatically.

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