# Compress Elasticsearch Index/Disk Usage Elasticsearch

**URL:** https://discuss.elastic.co/t/compress-elasticsearch-index-disk-usage-elasticsearch/16463
**Category:** Elasticsearch
**Created:** [March 19, 2014, 12:10pm UTC](https://discuss.elastic.co/t/compress-elasticsearch-index-disk-usage-elasticsearch/16463 "2014-03-19T12:10:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![german23](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/german23/32/11052_2.png) [@german23](https://discuss.elastic.co/u/german23)
#### Post date: [March 19, 2014, 12:10pm UTC](https://discuss.elastic.co/t/compress-elasticsearch-index-disk-usage-elasticsearch/16463/1 "2014-03-19T12:10:23Z")

</div>

Hey guys,

I just wanted to ask if there´s a possibility to decrease the disk space  
useage of an elasticsearch index.

e.g. i got an index called logstash-2014.03.17 with an size of 547MB and an  
total of 1018761 indexed documents/logs and i want to reduce the disk usage  
of it.

Regarding to that article i  
found: [https://github.com/elasticsearch/elasticsearch/issues/2037](https://github.com/elasticsearch/elasticsearch/issues/2037) all i  
have to do is to set index.store.compress.stored to true.

I´ve done this with  
-curl -XPOST 'localhost:9200/logstash-2014.03.17/\_close'  
-curl curl -XPUT 'localhost:9200/logstash-2014.03.17/\_settings' -d '  
{  
"index" : {  
" index.store.compress.stored" : true  
} }  
'  
-curl -XPOST 'localhost:9200/logstash-2014.03.17/\_open'

than i optimized the index with the command:

curl -XPOST '[http://localhost:9200/logstash-2014.03.17/\_optimize](http://localhost:9200/logstash-2014.03.17/_optimize)'

and restarted the cluster.

Unfortunately nothing happend and it still uses 547MB of disk space.

Have i done sth. wrong?

Are there other ways to decrease the disk space useage?

Thanks for response.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8b4d651e-7379-47e8-88a1-189308d118f3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8b4d651e-7379-47e8-88a1-189308d118f3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)
#### Post date: [March 19, 2014, 4:42pm UTC](https://discuss.elastic.co/t/compress-elasticsearch-index-disk-usage-elasticsearch/16463/2 "2014-03-19T16:42:56Z")

</div>

Hi,

This setting doesn't exist anymore as indices are now always compressed.

One thing that might help gain back some (not much, don't expect too much  
from it) disk is to run an \_optimize[1] call on this index. You can use  
curator[2] in order to automate this operation.

[1]

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

[2] [GitHub - elastic/curator: Curator: Tending your Elasticsearch indices](https://github.com/elasticsearch/curator)

On Wed, Mar 19, 2014 at 1:10 PM, horst knete [baduncle23@hotmail.de](mailto:baduncle23@hotmail.de) wrote:

> Hey guys,
> 
> I just wanted to ask if there´s a possibility to decrease the disk space  
> useage of an elasticsearch index.
> 
> e.g. i got an index called logstash-2014.03.17 with an size of 547MB and  
> an total of 1018761 indexed documents/logs and i want to reduce the disk  
> usage of it.
> 
> Regarding to that article i found:  
> [Stored Fields Compression · Issue #2037 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/2037) all i have to  
> do is to set index.store.compress.stored to true.
> 
> I´ve done this with  
> -curl -XPOST 'localhost:9200/logstash-2014.03.17/\_close'  
> -curl curl -XPUT 'localhost:9200/logstash-2014.03.17/\_settings' -d '  
> {  
> "index" : {  
> " index.store.compress.stored" : true  
> } }  
> '  
> -curl -XPOST 'localhost:9200/logstash-2014.03.17/\_open'
> 
> than i optimized the index with the command:
> 
> curl -XPOST '[http://localhost:9200/logstash-2014.03.17/\_optimize](http://localhost:9200/logstash-2014.03.17/_optimize)'
> 
> and restarted the cluster.
> 
> Unfortunately nothing happend and it still uses 547MB of disk space.
> 
> Have i done sth. wrong?
> 
> Are there other ways to decrease the disk space useage?
> 
> Thanks for response.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/8b4d651e-7379-47e8-88a1-189308d118f3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8b4d651e-7379-47e8-88a1-189308d118f3%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/8b4d651e-7379-47e8-88a1-189308d118f3%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8b4d651e-7379-47e8-88a1-189308d118f3%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Adrien Grand

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7AeyNWuJJLDcadxVasEZQ%2Bu-M6eNJe2F7V7DjupZUSoA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7AeyNWuJJLDcadxVasEZQ%2Bu-M6eNJe2F7V7DjupZUSoA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![german23](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/german23/32/11052_2.png) [@german23](https://discuss.elastic.co/u/german23)
#### Post date: [March 20, 2014, 7:20am UTC](https://discuss.elastic.co/t/compress-elasticsearch-index-disk-usage-elasticsearch/16463/3 "2014-03-20T07:20:57Z")

</div>

Hi Adrien,

thanks for respone.

The Curator is a very helpful tool thanks for the link!

I tried it and save about 1 GB of disk space (24-\>23GB) i think the effekt  
increases with more indexes.

Am Mittwoch, 19. März 2014 17:42:56 UTC+1 schrieb Adrien Grand:

> Hi,
> 
> This setting doesn't exist anymore as indices are now always compressed.
> 
> One thing that might help gain back some (not much, don't expect too much  
> from it) disk is to run an \_optimize[1] call on this index. You can use  
> curator[2] in order to automate this operation.
> 
> [1]  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-optimize.html)  
> [2] [GitHub - elastic/curator: Curator: Tending your Elasticsearch indices](https://github.com/elasticsearch/curator)
> 
> On Wed, Mar 19, 2014 at 1:10 PM, horst knete \<[badun...@hotmail.de](mailto:badun...@hotmail.de)\<javascript:\>
> 
> > wrote:
> 
> > Hey guys,
> > 
> > I just wanted to ask if there´s a possibility to decrease the disk space  
> > useage of an elasticsearch index.
> > 
> > e.g. i got an index called logstash-2014.03.17 with an size of 547MB and  
> > an total of 1018761 indexed documents/logs and i want to reduce the disk  
> > usage of it.
> > 
> > Regarding to that article i found:  
> > [Stored Fields Compression · Issue #2037 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/2037) all i have to  
> > do is to set index.store.compress.stored to true.
> > 
> > I´ve done this with  
> > -curl -XPOST 'localhost:9200/logstash-2014.03.17/\_close'  
> > -curl curl -XPUT 'localhost:9200/logstash-2014.03.17/\_settings' -d '  
> > {  
> > "index" : {  
> > " index.store.compress.stored" : true  
> > } }  
> > '  
> > -curl -XPOST 'localhost:9200/logstash-2014.03.17/\_open'
> > 
> > than i optimized the index with the command:
> > 
> > curl -XPOST '[http://localhost:9200/logstash-2014.03.17/\_optimize](http://localhost:9200/logstash-2014.03.17/_optimize)'
> > 
> > and restarted the cluster.
> > 
> > Unfortunately nothing happend and it still uses 547MB of disk space.
> > 
> > Have i done sth. wrong?
> > 
> > Are there other ways to decrease the disk space useage?
> > 
> > Thanks for response.
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/8b4d651e-7379-47e8-88a1-189308d118f3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8b4d651e-7379-47e8-88a1-189308d118f3%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/8b4d651e-7379-47e8-88a1-189308d118f3%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8b4d651e-7379-47e8-88a1-189308d118f3%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Adrien Grand

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/814e94ff-50c8-42ba-b587-0f04b3a8812b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/814e94ff-50c8-42ba-b587-0f04b3a8812b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 1:41am UTC](https://discuss.elastic.co/t/compress-elasticsearch-index-disk-usage-elasticsearch/16463/4 "2017-07-06T01:41:58Z")

</div>


