How to reclaim disk space for an index?

Hi,

I'm starting a project with Elasticsearch (version 6.3.2), and I've got a disk which has a capacity of 100GB. I know that the disk has 40GB of free space, and the rest is occupied by Elasticsearch data (60GB). However, if I check the monitoring area, I can see that Elasticsearch claims that it is only occupying 33.2GB with index data. This means that there is almost 27GB of space which I do not know who is occupying.

I've done a few checks manually, and I've come accross some indexes which have deleted documents, that occupy far more disk space than Elasticsearch claims. For example, I have an idex with docs.count = 44173 and docs.deleted = 18287. Elasticsearch has a store.size = pri.store.size = 18.1MB, but on disk, I can see that this folder occupies approximately 1.4GB of disk space. I would like to know if there is any way of reclaiming this disk space. From what I've seen, this only happens for indices with deleted documents (I didn't check all the indices though). I've tried a forcemerge on the index, both with and without the max_num_segments = 1, and both with and without only_expunge_deletes = true, but I have not seen any significant changes.

Can anyone help me with this one?

Thanks a lot!

I found out that this was related to the translog, which was occupying a lot of disk space.

I followed the reccommendations on this link:

I set my maximum retention size to 50mb and my maximum retention age to 60m. This made the translog size to decrease from almost 30gb to 2.5gb

Thanks a lot

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