# Understanding Index Buffer Size and Its Effects

**URL:** <https://discuss.elastic.co/t/understanding-index-buffer-size-and-its-effects/15113>\
**Category:** Elasticsearch\
**Created:** [January 6, 2014, 12:03pm UTC](https://discuss.elastic.co/t/understanding-index-buffer-size-and-its-effects/15113 "2014-01-06T12:03:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaidik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vaidik/32/1134_2.png) [@vaidik](https://discuss.elastic.co/u/vaidik)\
**Post date:** [January 6, 2014, 12:03pm UTC](https://discuss.elastic.co/t/understanding-index-buffer-size-and-its-effects/15113/1 "2014-01-06T12:03:48Z")

</div>

Hey Guys,

I am tuning my Elasticsearch which consists of 3 dedicated servers:

- 2 Octocore Processors (16 Cores), with HT (32 threads)
- 32 GB RAM (DDR3)

We are running the latest beta2. We have allocated 16 GB to Elasticsearch.

We have only 1 index with 32 shards and 1 replica each, making it 64 shards  
in the cluster.  
We have a lot of updates queries. In fact, we have only update queries with  
upserts. We are using routing to put similar data in the same shard. We see  
the rate of update queries ranging between 20/sec to 60/sec. This is going  
to increase to about 130-140/sec when we go live. Our queries are mostly  
filtered queries with a lot of use of term faceting.

I have allocated 40% memory to index\_buffer\_size (this was very random),  
which comes out to be around 6.4 GB. Average document size is 900 Bytes.

I have a feeling that the allocated buffer size is going waste as our  
indexing/updating/upserting rates are not so high. If my reasoning is  
correct, with 60 upserts/sec of docs that are of average size 1 KB,  
index\_buffer\_size 60 x 1 KB x 32 (shards) x 3 (keeping room for 3 times  
traffic) = 5760 KB (approx. 5 MB) should be more than enough. And by  
allocating 40% of the JVM, I am wasting the heap which I could probably use  
for Filter Cache and Field Data Cache.

Now I have the following questions:

- Are my calculations correct?
- Is there something else that I need to consider?
- If the index\_buffer\_size is under utilized, will Elasticsearch be able  
to use a portion of it for something else when required?

Looking forward to some valuable feedback. Will be happy to share more  
details if required.

Thanks,  
Vaidik Kapoor  
vaidikkapoor.info

--  
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/CACWtv5nGDrmFdEphRYjtQynMgrkfAePGMTjydSwzn4SYNVYZPA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CACWtv5nGDrmFdEphRYjtQynMgrkfAePGMTjydSwzn4SYNVYZPA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [January 6, 2014, 2:44pm UTC](https://discuss.elastic.co/t/understanding-index-buffer-size-and-its-effects/15113/2 "2014-01-06T14:44:44Z")

</div>

You can not waste heap. The percentage allocations are dynamic upper  
bounds, where you tell ES "if you are about dynamically re-allocating  
buffers, look if you have exceeded this limit".

To watch ES using dynamic buffer re-allocations, enable DEBUG level in the  
logs.

Jörg

--  
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/CAKdsXoH8eOrYvyTm%3DnM0x\_yhazVNGJDO7oo-xJq-AniVZk3B%3Dg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH8eOrYvyTm%3DnM0x_yhazVNGJDO7oo-xJq-AniVZk3B%3Dg%40mail.gmail.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, 1:58am UTC](https://discuss.elastic.co/t/understanding-index-buffer-size-and-its-effects/15113/3 "2017-07-06T01:58:12Z")

</div>


