Apply best_compression to save disk space

Hi All,

We are struggling with disk space issues on the Elasticsearch nodes. I came across the best_compression option and the suggested way is as follows using dev tools:


1. Close all indices:

POST _all/_close

2. Apply best_compression to all

PUT _all/_settings -d '{"index.codec" : "best_compression"}'

3. Open all indices:

POST _all/_open

Please guide if this is the correct way to achieve best compression. We have ELK 7.6.2 stack

In order for the compression to take effect I believe you need to forcemerge the indices down to fewer segments as only newly created/merged segments will get the improved compression applied.

Thanks. So should it now look like:

1. Close all indices:

POST _all/_close

2. Apply best_compression to all

PUT _all/_settings -d '{"index.codec" : "best_compression"}'

3. Open all indices:

POST _all/_open

4. Force merge all indices

POST /_forcemerge

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