# RAM / memory sizing

**URL:** <https://discuss.elastic.co/t/ram-memory-sizing/18742>\
**Category:** Elasticsearch\
**Created:** [July 18, 2014, 4:51pm UTC](https://discuss.elastic.co/t/ram-memory-sizing/18742 "2014-07-18T16:51:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steffen\_Otto](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Steffen\_Otto](https://discuss.elastic.co/u/Steffen_Otto)\
**Post date:** [July 18, 2014, 4:51pm UTC](https://discuss.elastic.co/t/ram-memory-sizing/18742/1 "2014-07-18T16:51:41Z")

</div>

Hi together,

I need to size memory of a elasticsearch cluster. I expect an total index  
size of 5 terra byte.

For example: If I would use 5 server with 1 terra byte harddrives,

what should each server have for RAM sizes to get great read performance?

Is there a rule of thumb for sizing server RAM based on index size?

Best regards  
Steffen

--  
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/9581f499-bef6-4437-86f4-8620d517fb98%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9581f499-bef6-4437-86f4-8620d517fb98%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 18, 2014, 5:24pm UTC](https://discuss.elastic.co/t/ram-memory-sizing/18742/2 "2014-07-18T17:24:47Z")

</div>

I assume you mean query performance when you mention "great read  
performance"

It depends on the queries. Several factors are to consider:

- data characteristics (number of fields, number of terms, number of docs,  
immutable/mutable data, change rate,...)
- query types/complexities (simple term queries, boolean queries, filters,  
caching, aggregations,...)
- query load (how many searches must be performed in a given time interval)

Regarding an index size as large as TB, I think it would be best to put a  
logical ordering on it and split the index into many indices, e.g. into  
timeseries indices or into user id based indices, and combine indices with  
an index alias to a logical unit. Then sliding window techniques can be  
used to focus the search only on indices which are relevant for expected  
responses. This allows to control hot spots in your data, and it can save  
enormous amounts of resources for replica shards.

Jörg

On Fri, Jul 18, 2014 at 6:51 PM, Steffen Otto \<[steffen.otto22@googlemail.com](mailto:steffen.otto22@googlemail.com)

> wrote:

> Hi together,
> 
> I need to size memory of a elasticsearch cluster. I expect an total index  
> size of 5 terra byte.
> 
> For example: If I would use 5 server with 1 terra byte harddrives,
> 
> what should each server have for RAM sizes to get great read performance?
> 
> Is there a rule of thumb for sizing server RAM based on index size?
> 
> Best regards  
> Steffen
> 
> --  
> 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/9581f499-bef6-4437-86f4-8620d517fb98%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9581f499-bef6-4437-86f4-8620d517fb98%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/9581f499-bef6-4437-86f4-8620d517fb98%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/9581f499-bef6-4437-86f4-8620d517fb98%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAKdsXoFKJz-fcvGmxx7%3DsUFaB27BREzWsydsCwQJfOiNSvG-gQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFKJz-fcvGmxx7%3DsUFaB27BREzWsydsCwQJfOiNSvG-gQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Steffen\_Otto](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Steffen\_Otto](https://discuss.elastic.co/u/Steffen_Otto)\
**Post date:** [July 18, 2014, 5:33pm UTC](https://discuss.elastic.co/t/ram-memory-sizing/18742/3 "2014-07-18T17:33:32Z")

</div>

Hi Jörg, thank you for your answer but you did not answer my question.  
Is there a general rule of thumb for RAM sizing a machine when I expect an fixed index size for great query performance?  
And also is there a upper size where more RAM does not make more sense?  
Best regards  
Steffen

--  
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/8c565999-1dc2-4591-a79d-4dc815e50352%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8c565999-1dc2-4591-a79d-4dc815e50352%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 18, 2014, 7:21pm UTC](https://discuss.elastic.co/t/ram-memory-sizing/18742/4 "2014-07-18T19:21:52Z")

</div>

No, there is no general rule of thumb, since there is no direct correlation  
between a fixed index size and the demand for RAM.

There is no upper size limit for RAM imposed by Elasticsearch. JVM  
implementations imposes some restrictions, for heaps \> 4g, garbage  
collecting the heap objects becomes challenging. This is true for all Java  
server applications.

Jörg

On Fri, Jul 18, 2014 at 7:33 PM, Steffen Otto \<[steffen.otto22@googlemail.com](mailto:steffen.otto22@googlemail.com)

> wrote:

> Hi Jörg, thank you for your answer but you did not answer my question.  
> Is there a general rule of thumb for RAM sizing a machine when I expect an  
> fixed index size for great query performance?  
> And also is there a upper size where more RAM does not make more sense?  
> Best regards  
> Steffen
> 
> --  
> 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/8c565999-1dc2-4591-a79d-4dc815e50352%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8c565999-1dc2-4591-a79d-4dc815e50352%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAKdsXoF3ysHg%2BmOU-jCMharPBx\_b3PRJucMcbGp425wAbTurwQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoF3ysHg%2BmOU-jCMharPBx_b3PRJucMcbGp425wAbTurwQ%40mail.gmail.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:14am UTC](https://discuss.elastic.co/t/ram-memory-sizing/18742/5 "2017-07-06T01:14:49Z")

</div>


