# Elastic RAM:Disk Ratio Minimum

**URL:** <https://discuss.elastic.co/t/elastic-ram-disk-ratio-minimum/132435>\
**Category:** Elasticsearch\
**Created:** [May 18, 2018, 8:18am UTC](https://discuss.elastic.co/t/elastic-ram-disk-ratio-minimum/132435 "2018-05-18T08:18:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![safhw91](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@safhw91](https://discuss.elastic.co/u/safhw91)\
**Post date:** [May 18, 2018, 8:18am UTC](https://discuss.elastic.co/t/elastic-ram-disk-ratio-minimum/132435/1 "2018-05-18T08:18:20Z")

</div>

Hello,

I understand the optimum RAM:disk ratio is 1:24. Based on my own testing, I've used 1GB of RAM to support up to 77GB of data in Elastic's (based on Kibana's "store.size"). But that's a bad test since it crashed at that point.

Based on my previous talks with Elastic staff IRL, my previous understanding was that if there's less RAM, Elastic would simply be slower, and that was a tradeoff I was willing to make. But it seems if there is not enough RAM then Elastic just crashes instead.

So my questions:

1. Is there a maximum ratio that Elastic would say is absolutely wrong? e.g. 1:50 is "max".
2. Is there some setting that would help me improve this ratio, or prevent Elastic from crashing?

---

<div class="post-metadata">

**Author:** ![JKhondhu](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JKhondhu](https://discuss.elastic.co/u/JKhondhu)\
**Post date:** [May 18, 2018, 9:11am UTC](https://discuss.elastic.co/t/elastic-ram-disk-ratio-minimum/132435/2 "2018-05-18T09:11:13Z")

</div>

> [@safhw91](#):
>
> less RAM, Elastic would simply be slower

The Elasticsearch `store.size` is the store size taken by primary & replica shards.

Not exactly `slower` but prone to the danger of out of memory errors due to a small heap, yes.  
Why do you need a ratio? There is no one ratio fits all here I'm afraid. This very much depends.

If you want to prevent crashing you need better optimisation of what you already have to work with your current heap size OR increase heap.

ref:

1. [A Heap of Trouble: Managing Elasticsearch's Managed Heap | Elastic Blog](https://www.elastic.co/blog/a-heap-of-trouble)
2. [Kagillion Shards | Elasticsearch: The Definitive Guide [master] | Elastic](https://www.elastic.co/guide/en/elasticsearch/guide/master/kagillion-shards.html)

---

<div class="post-metadata">

**Author:** ![safhw91](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@safhw91](https://discuss.elastic.co/u/safhw91)\
**Post date:** [May 18, 2018, 9:42am UTC](https://discuss.elastic.co/t/elastic-ram-disk-ratio-minimum/132435/3 "2018-05-18T09:42:29Z")

</div>

I am not asking for a ratio to solve my problems.

I am asking for the maximum ratio whereby the application will not crash --- there's a big difference.

If there was no such thing as a ratio, the Elastic team wouldn't put 1:24 for Elastic Cloud. So 1:25 would be slightly slower than 1:24. 1:26, slower more. But whatever the case, 1:24 does not crash the system for sure according to Elastic. Does 1:25? 1:30? 1:40? 1:50? That is my question.

---

<div class="post-metadata">

**Author:** ![JKhondhu](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JKhondhu](https://discuss.elastic.co/u/JKhondhu)\
**Post date:** [May 18, 2018, 9:50am UTC](https://discuss.elastic.co/t/elastic-ram-disk-ratio-minimum/132435/4 "2018-05-18T09:50:33Z")

</div>

Taken from our docs:

```auto
The disk-to-RAM ratio currently is 1:24, meaning that you get 24 GB of storage space for each 1 GB of RAM. 

```

`Tip` For production systems, we recommend not using less than 4 GB of RAM for your cluster, which assigns 2 GB to the JVM heap.

The RAM to disk ratio will depend a lot on your use case, query patterns and latency requirements. 1:24 is not in any way a hard limit for Elasticsearch, but rather what we use in Elastic Cloud **as it is suitable for a wide variety of use cases**

The ideal ratio will depend on your hardware and your index and query patterns, so the only way to really know is to benchmark with realistic data and queries on the actual hardware. We talked about cluster sizing at Elastic{ON}, and this might give you an idea about how to go about determining the ratio for your use case and hardware.  
ref: [https://www.elastic.co/elasticon/conf/2016/sf/quantitative-cluster-sizing](https://www.elastic.co/elasticon/conf/2016/sf/quantitative-cluster-sizing)

---

<div class="post-metadata">

**Author:** ![Abhilash\_Bolla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhilash_bolla/32/26840_2.png) [@Abhilash\_Bolla](https://discuss.elastic.co/u/Abhilash_Bolla)\
**Post date:** [May 18, 2018, 11:14am UTC](https://discuss.elastic.co/t/elastic-ram-disk-ratio-minimum/132435/5 "2018-05-18T11:14:15Z")

</div>

As rightly pointed out by @JKhondhu, there isn't any magic number for RAM:disk ratio or Number of shards or Heap size. You may consider looking at [this link](https://www.elastic.co/guide/en/elasticsearch/guide/current/capacity-planning.html).

---

<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:** [June 15, 2018, 11:14am UTC](https://discuss.elastic.co/t/elastic-ram-disk-ratio-minimum/132435/6 "2018-06-15T11:14:32Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
