# Compression algorithm for best Search Performance in Elastic

**URL:** https://discuss.elastic.co/t/compression-algorithm-for-best-search-performance-in-elastic/324972
**Category:** Elasticsearch
**Created:** [February 8, 2023, 5:57am UTC](https://discuss.elastic.co/t/compression-algorithm-for-best-search-performance-in-elastic/324972 "2023-02-08T05:57:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![siddhartha\_c](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siddhartha_c/32/115957_2.png) [@siddhartha\_c](https://discuss.elastic.co/u/siddhartha_c)
#### Post date: [February 8, 2023, 5:57am UTC](https://discuss.elastic.co/t/compression-algorithm-for-best-search-performance-in-elastic/324972/1 "2023-02-08T05:57:04Z")

</div>

Hi Team,  
Which is the best compression algorithm in Elastic for the best search performance.  
We have 100 TB of data to be indexed in an Index. The idea is to have best search performance as a trade off with the index size.  
What would be the approx. Index size for 100TB data (I know, a lot depends on the data type and other factors.).  
I mean what's the compression ratio for that algorithm.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 8, 2023, 6:02am UTC](https://discuss.elastic.co/t/compression-algorithm-for-best-search-performance-in-elastic/324972/2 "2023-02-08T06:02:55Z")

</div>

The default is LZ4 which is lower compression than `best_compression` and thus will use less CPU during search and index.

See `index.codec` in [Index modules | Elasticsearch Guide [8.6] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.6/index-modules.html).

---

<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: [March 8, 2023, 6:03am UTC](https://discuss.elastic.co/t/compression-algorithm-for-best-search-performance-in-elastic/324972/3 "2023-03-08T06:03:17Z")

</div>

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