Compress ELK data node

hello all

there is option in node level or index level to configure
elasticsearch data compress

thx
asaf

Look at https://www.elastic.co/guide/en/elasticsearch/reference/2.4/index-modules.html#_static_index_settings

index.codec

so as i undrostood i've just need to add index.codec: best_compression to elasticsearch.yml file

You can apply that to the index dynamically.

Can this be done in 2.4? Its listed under static settings in the docs and I'm getting this error when trying:
Can't update non dynamic settings[[index.codec]] for open indices

You do need to close the index, apply, then reopen it.

Got it.
If i want to both force merge & change the codec, should i first change the codec and then merge, or first merge and then change the codec?

EDIT - actually I was wrong. You need to change the codec first because the merge is what applies it.

1 Like

And if i already merged to 1 segment, will running the merge again do something? Because when I'm running it now, it finishes immediately. So how can i change the codec now?

You can change it, just run a force merge again.

It does not re-run the merge once its fully merged to 1 segment per shard.

Don't expect huge savings from doing this. The index should already be compressed. You are just setting a higher compression level.

I reached 50% savings, thats very huge for me :slight_smile:

For tracking purposes: https://github.com/elastic/elasticsearch/issues/20936

1 Like