# Elastic 2.0 beta 'best\_compresion' vs default 1.6 compression

**URL:** https://discuss.elastic.co/t/elastic-2-0-beta-best-compresion-vs-default-1-6-compression/26092
**Category:** Elasticsearch
**Created:** [July 22, 2015, 3:08pm UTC](https://discuss.elastic.co/t/elastic-2-0-beta-best-compresion-vs-default-1-6-compression/26092 "2015-07-22T15:08:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ziv2081](https://avatars.discourse-cdn.com/v4/letter/z/d2c977/32.png) [@ziv2081](https://discuss.elastic.co/u/ziv2081)
#### Post date: [July 22, 2015, 3:08pm UTC](https://discuss.elastic.co/t/elastic-2-0-beta-best-compresion-vs-default-1-6-compression/26092/1 "2015-07-22T15:08:08Z")

</div>

Hey,

I've downloaded the master branch from git and installed the beta in order to compare 'best\_compression' VS the current platform's compression with our data set.

What I did was indexing 1840000 documents and then changed the config file and added index.codec: “best\_compression”, restarted and used the optimise API.

Unfortunately I did not see much of a difference, and actually the index was bigger for the 'best\_compression'.

My 1.6.0 runs on CentOS and the following is the information of the index size:  
docs.count docs.deleted store.size pri.store.size  
1840000 0 152mb 152mb

The 2.0.0 beta runs on OS X and the following is the index size:  
docs.count docs.deleted store.size pri.store.size  
1840000 0 156mb 156mb

My data set is a mix of random ints and strings of 80000 documents, which were duplicated 23 times.

What am I doing wrong?  
Or what should I expect?

---

<div class="post-metadata">

### Author: ![rmuir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rmuir/32/44949_2.png) [@rmuir](https://discuss.elastic.co/u/rmuir)
#### Post date: [July 22, 2015, 10:48pm UTC](https://discuss.elastic.co/t/elastic-2-0-beta-best-compresion-vs-default-1-6-compression/26092/2 "2015-07-22T22:48:41Z")

</div>

don't try to compress random data.

---

<div class="post-metadata">

### Author: ![ziv2081](https://avatars.discourse-cdn.com/v4/letter/z/d2c977/32.png) [@ziv2081](https://discuss.elastic.co/u/ziv2081)
#### Post date: [July 23, 2015, 9:04am UTC](https://discuss.elastic.co/t/elastic-2-0-beta-best-compresion-vs-default-1-6-compression/26092/3 "2015-07-23T09:04:57Z")

</div>

I don't know if you could consider it random when everything repeats a lot of times.

When I gzip the Index then i see 1:3 compression ratio. I thought this would similar using 'best\_compression'.  
I've tried another test by dumping the dir list of my machine, and indexing the fullpaths of all the files.  
text file is 23mb, compressed 1.5mb, of 230k file paths, average size of path is 100 bytes.  
When indexing this file, the index size is roughly 23mb as well.  
I've tried removing the \_all, \_source and set index=not\_analyzed but looks like it doesn't affect the size of the index.

---

<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: [July 5, 2017, 11:59pm UTC](https://discuss.elastic.co/t/elastic-2-0-beta-best-compresion-vs-default-1-6-compression/26092/4 "2017-07-05T23:59:37Z")

</div>


