# ML node memory configuration

**URL:** https://discuss.elastic.co/t/ml-node-memory-configuration/219064
**Category:** Elastic Cloud Enterprise (ECE)
**Tags:** elastic-stack-machine-learning
**Created:** [February 12, 2020, 6:56pm UTC](https://discuss.elastic.co/t/ml-node-memory-configuration/219064 "2020-02-12T18:56:38Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![danielyahn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielyahn/32/41575_2.png) [@danielyahn](https://discuss.elastic.co/u/danielyahn)
#### Post date: [February 12, 2020, 6:56pm UTC](https://discuss.elastic.co/t/ml-node-memory-configuration/219064/1 "2020-02-12T18:56:38Z")

</div>

From [Sizing for Machine Learning with Elasticsearch | Elastic Blog](https://www.elastic.co/blog/sizing-machine-learning-with-elasticsearch)

> We recommend that ML nodes have at least 4 Cores and 64GB RAM. Assign 24GB of memory to the JVM Heap, reserving 40GB for ML processing.

Is it possible to configure ML-dedicated node from ECE with such heap and off-heap requirements?

---

<div class="post-metadata">

### Author: ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)
#### Post date: [February 12, 2020, 7:15pm UTC](https://discuss.elastic.co/t/ml-node-memory-configuration/219064/2 "2020-02-12T19:15:51Z")

</div>

I don't believe so. According to [https://www.elastic.co/guide/en/cloud-enterprise/2.4/ece-heap.html](https://www.elastic.co/guide/en/cloud-enterprise/2.4/ece-heap.html), ECE automatically allocates %50 of the available RAM to the JVM and there doesn't seem to be a way for the user to modify that.

---

<div class="post-metadata">

### Author: ![danielyahn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielyahn/32/41575_2.png) [@danielyahn](https://discuss.elastic.co/u/danielyahn)
#### Post date: [February 12, 2020, 7:35pm UTC](https://discuss.elastic.co/t/ml-node-memory-configuration/219064/3 "2020-02-12T19:35:55Z")

</div>

Thanks for the input. Any other guidance on how to size the ML node? Other than:

> 64GB RAM. Assign 24GB of memory to the JVM Heap, reserving 40GB for ML processing.

---

<div class="post-metadata">

### Author: ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)
#### Post date: [February 12, 2020, 9:01pm UTC](https://discuss.elastic.co/t/ml-node-memory-configuration/219064/4 "2020-02-12T21:01:06Z")

</div>

ML jobs are almost always "constrained" by the amount of memory required to run - and that's a function of how many unique time-series being modeled. In general, the conservative rule of thumb is a 100MB base overhead, plus 20k-30k of RAM for every partition field. So, a job running on 5000 unique time-series could require about 250MB of RAM.

The default "limit" of RAM per ML job is `1024mb` as set by the parameter `model_memory_limit` (see [docs](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/ml-put-job.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: [February 26, 2020, 9:01pm UTC](https://discuss.elastic.co/t/ml-node-memory-configuration/219064/5 "2020-02-26T21:01:12Z")

</div>

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