# Elasticsearch merge slowness

**URL:** <https://discuss.elastic.co/t/elasticsearch-merge-slowness/11807>\
**Category:** Elasticsearch\
**Created:** [May 4, 2013, 5:28am UTC](https://discuss.elastic.co/t/elasticsearch-merge-slowness/11807 "2013-05-04T05:28:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexis\_Okuwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexis_okuwa/32/1983_2.png) [@Alexis\_Okuwa](https://discuss.elastic.co/u/Alexis_Okuwa)\
**Post date:** [May 4, 2013, 5:28am UTC](https://discuss.elastic.co/t/elasticsearch-merge-slowness/11807/1 "2013-05-04T05:28:15Z")

</div>

Yesterday i thought there was with my small vm (2gb ram, 2gb disk) and a  
million items in my es database, So I started dropping types in the same  
index, in the end dropped 70k types and did not solve the issue (something  
else was the issue), none the less elasticsearch paid me a visit with  
merging documents i deleted out. This took over 12 hours and it was doing  
it in bulk and when it did them CPU went up for a while 1-5 minutes. Is  
this suppopse to happen or is merge suppose to be a little more gentail.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)\
**Post date:** [May 4, 2013, 7:52am UTC](https://discuss.elastic.co/t/elasticsearch-merge-slowness/11807/2 "2013-05-04T07:52:19Z")

</div>

Hello,

I guess merging can be painfull if it's caused by massive deletes on a  
small vm, because you can get up to 30 going on at the same time, if my  
understanding is correct (index.merge.policy.max\_merge\_at\_once\_explicit is  
30 by default).

You should be able to make it more gentle by reducing that number though  
from the index settings[http://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings/](http://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings/)  
.

Also, if your CPU load is caused by I/O waits, store  
throttling[http://www.elasticsearch.org/guide/reference/index-modules/store/](http://www.elasticsearch.org/guide/reference/index-modules/store/)might  
also help.

## Best regards, Radu

[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

On Sat, May 4, 2013 at 8:28 AM, Wojons Tech [wojonstech@gmail.com](mailto:wojonstech@gmail.com) wrote:

> Yesterday i thought there was with my small vm (2gb ram, 2gb disk) and a  
> million items in my es database, So I started dropping types in the same  
> index, in the end dropped 70k types and did not solve the issue (something  
> else was the issue), none the less elasticsearch paid me a visit with  
> merging documents i deleted out. This took over 12 hours and it was doing  
> it in bulk and when it did them CPU went up for a while 1-5 minutes. Is  
> this suppopse to happen or is merge suppose to be a little more gentail.
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Alexis\_Okuwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexis_okuwa/32/1983_2.png) [@Alexis\_Okuwa](https://discuss.elastic.co/u/Alexis_Okuwa)\
**Post date:** [May 4, 2013, 7:55am UTC](https://discuss.elastic.co/t/elasticsearch-merge-slowness/11807/3 "2013-05-04T07:55:38Z")

</div>

Okay so I will look at lowering that number to something resonable for the  
size of my vm. Also the link to store throttling is very intresting and i  
am going to try that out. The goal is to have indexes by date and alias  
them but for dev i am just storing everything in the same one until i write  
the code to handle that.

On Sat, May 4, 2013 at 12:52 AM, Radu Gheorghe  
[radu.gheorghe@sematext.com](mailto:radu.gheorghe@sematext.com)wrote:

> Hello,
> 
> I guess merging can be painfull if it's caused by massive deletes on a  
> small vm, because you can get up to 30 going on at the same time, if my  
> understanding is correct (index.merge.policy.max\_merge\_at\_once\_explicit is  
> 30 by default).
> 
> You should be able to make it more gentle by reducing that number though  
> from the index settings[http://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings/](http://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings/)  
> .
> 
> Also, if your CPU load is caused by I/O waits, store throttling[http://www.elasticsearch.org/guide/reference/index-modules/store/](http://www.elasticsearch.org/guide/reference/index-modules/store/)might also help.
> 
> ## Best regards, Radu
> 
> [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene
> 
> On Sat, May 4, 2013 at 8:28 AM, Wojons Tech [wojonstech@gmail.com](mailto:wojonstech@gmail.com) wrote:
> 
> > Yesterday i thought there was with my small vm (2gb ram, 2gb disk) and a  
> > million items in my es database, So I started dropping types in the same  
> > index, in the end dropped 70k types and did not solve the issue (something  
> > else was the issue), none the less elasticsearch paid me a visit with  
> > merging documents i deleted out. This took over 12 hours and it was doing  
> > it in bulk and when it did them CPU went up for a while 1-5 minutes. Is  
> > this suppopse to happen or is merge suppose to be a little more gentail.
> > 
> > --  
> > 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).
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/1fyUmiqQzWc/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/1fyUmiqQzWc/unsubscribe?hl=en-US)  
> .  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Enjoy,  
Alexis Okuwa  
WojonsTech  
424.835.1223

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:38am UTC](https://discuss.elastic.co/t/elasticsearch-merge-slowness/11807/4 "2017-07-06T02:38:21Z")

</div>


