# Disabling Elasticsearch Index compression version 7.10+

**URL:** https://discuss.elastic.co/t/disabling-elasticsearch-index-compression-version-7-10/357648
**Category:** Elasticsearch
**Created:** [April 17, 2024, 6:20pm UTC](https://discuss.elastic.co/t/disabling-elasticsearch-index-compression-version-7-10/357648 "2024-04-17T18:20:18Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![tommyd](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@tommyd](https://discuss.elastic.co/u/tommyd)
#### Post date: [April 17, 2024, 6:20pm UTC](https://discuss.elastic.co/t/disabling-elasticsearch-index-compression-version-7-10/357648/1 "2024-04-17T18:20:18Z")

</div>

Hi, I am new to Elasticsearch and I have a question around Elasticsearch compression. I know it uses the codec default and best\_compression when creating an index but since my backend storage already provides LZ4 compression, is there away to disable compression at the Elasticsearch Index level? This way I can free up CPU cycles on the ES nodes and let the storage array does all the compression for me.  
Thanks in advance.

---

<div class="post-metadata">

### Author: ![Kathleen\_DeRusso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kathleen_derusso/32/132039_2.png) [@Kathleen\_DeRusso](https://discuss.elastic.co/u/Kathleen_DeRusso)
#### Post date: [April 17, 2024, 6:52pm UTC](https://discuss.elastic.co/t/disabling-elasticsearch-index-compression-version-7-10/357648/2 "2024-04-17T18:52:30Z")

</div>

I don't believe you can disable it, the only [options](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/index-modules.html#index-codec) are LZ4 or DEFLATE.

---

<div class="post-metadata">

### Author: ![tommyd](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@tommyd](https://discuss.elastic.co/u/tommyd)
#### Post date: [April 17, 2024, 7:05pm UTC](https://discuss.elastic.co/t/disabling-elasticsearch-index-compression-version-7-10/357648/3 "2024-04-17T19:05:50Z")

</div>

Thanks, Kathleen. So if someone who doesn't use DAS for storage, then they're stuck with the default settings? I saw some article talking about writing your own codec to disable compression but that requires recompiling ES code base? Is that an accurate statement?

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [April 17, 2024, 7:30pm UTC](https://discuss.elastic.co/t/disabling-elasticsearch-index-compression-version-7-10/357648/4 "2024-04-17T19:30:40Z")

</div>

> [@tommyd](#):
>
> Thanks, Kathleen. So if someone who doesn't use DAS for storage, then they're stuck with the default settings? I saw some article talking about writing your own codec to disable compression but that requires recompiling ES code base? Is that an accurate statement?

Hi @tommyd, Welcome to the community!

Yes no way AFAIK to disable compression, it is a core part of Elastic.

Unless you are at an extreme scale, Lucene is really, really efficient, it seems like a lot of work and risk and maintenance for perhaps a small gain... especially if you are just getting started with Elastic.

It seems like spending your time on good mappings, index management queries, etc., might be a better use of your time.

Just one opinion.

---

<div class="post-metadata">

### Author: ![tommyd](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@tommyd](https://discuss.elastic.co/u/tommyd)
#### Post date: [April 17, 2024, 7:54pm UTC](https://discuss.elastic.co/t/disabling-elasticsearch-index-compression-version-7-10/357648/5 "2024-04-17T19:54:59Z")

</div>

Thanks Stephen. Appreciated for your help and Kathleen's help!

Cheers!

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [April 17, 2024, 9:48pm UTC](https://discuss.elastic.co/t/disabling-elasticsearch-index-compression-version-7-10/357648/6 "2024-04-17T21:48:49Z")

</div>

> [@tommyd](#):
>
> I saw some article talking about writing your own codec to disable compression but that requires recompiling ES code base? Is that an accurate statement?

For completeness, yes, you would need to compile and repackage Elasticsearch (and quite possibly some of its dependencies) to disable compression.

I wouldn't be surprised to see worse performance after doing so too - the OS page cache would be working with the uncompressed data and so will fill up much much faster, and this is an extremely important factor for performance. There's a good reason this isn't offered as an option.

---

<div class="post-metadata">

### Author: ![tommyd](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@tommyd](https://discuss.elastic.co/u/tommyd)
#### Post date: [April 17, 2024, 10:03pm UTC](https://discuss.elastic.co/t/disabling-elasticsearch-index-compression-version-7-10/357648/7 "2024-04-17T22:03:11Z")

</div>

Thanks, David! This helps a lot.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 15, 2024, 10:04pm UTC](https://discuss.elastic.co/t/disabling-elasticsearch-index-compression-version-7-10/357648/8 "2024-05-15T22:04:09Z")

</div>

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