# Can we give more than 32GB Memory to dedicated Machine learning Node?

**URL:** https://discuss.elastic.co/t/can-we-give-more-than-32gb-memory-to-dedicated-machine-learning-node/325159
**Category:** Elasticsearch
**Tags:** elastic-stack-machine-learning
**Created:** [February 9, 2023, 3:09pm UTC](https://discuss.elastic.co/t/can-we-give-more-than-32gb-memory-to-dedicated-machine-learning-node/325159 "2023-02-09T15:09:36Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Umang\_Pachaury](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/umang_pachaury/32/113523_2.png) [@Umang\_Pachaury](https://discuss.elastic.co/u/Umang_Pachaury)
#### Post date: [February 9, 2023, 3:09pm UTC](https://discuss.elastic.co/t/can-we-give-more-than-32gb-memory-to-dedicated-machine-learning-node/325159/1 "2023-02-09T15:09:36Z")

</div>

As per the documentation it is recommended by Elasticsearch Team that every Elasticsearch node should have the memory slightly less than 32GB. Now My question is that does this apply to a dedicated Machine learning Node as well. And Even if we give more than 32GB memory to the Dedicated Machine Learning Node what might be the repercussions of that.

Regards  
Umang Pachaury

---

<div class="post-metadata">

### Author: ![droberts195](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/droberts195/32/17692_2.png) [@droberts195](https://discuss.elastic.co/u/droberts195)
#### Post date: [February 9, 2023, 3:51pm UTC](https://discuss.elastic.co/t/can-we-give-more-than-32gb-memory-to-dedicated-machine-learning-node/325159/2 "2023-02-09T15:51:32Z")

</div>

The recommendation is that the JVM heap size for Elasticsearch should be less than 32GB. This is so that the JVM can use compressed pointers. A JVM heap of 33GB will use space more wastefully than a JVM heap of 31GB.

The JVM heap size is different to the size of the machine/VM/container where the software is running. It's certainly possible and desirable at large scale for that to be bigger than 32GB.

So this question comes down to what you mean by "node". The Elastic docs are a bit confusing in this regard. Sometimes "node" is used to mean a JVM running Elasticsearch and sometimes "node" is used to mean the whole machine/VM/container that it's running on.

If you mean JVM heap size then no, you shouldn't give an ML JVM heap more than 32GB. In fact, ML nodes use most memory _outside_ the JVM so the JVM on an ML node should be smaller than on a data node.

But you'll be able to run more native ML processes with more memory, so you can certainly have machines/VMs/containers for ML that are bigger than 32GB.

---

<div class="post-metadata">

### Author: ![Umang\_Pachaury](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/umang_pachaury/32/113523_2.png) [@Umang\_Pachaury](https://discuss.elastic.co/u/Umang_Pachaury)
#### Post date: [February 23, 2023, 9:42am UTC](https://discuss.elastic.co/t/can-we-give-more-than-32gb-memory-to-dedicated-machine-learning-node/325159/3 "2023-02-23T09:42:39Z")

</div>

Hello,  
We followed this configuration and gave less than 31GB to JVM heap now we have configured one ML job and observed that while the job is running we were able to monitor some changes in JVM heap utilization in kibana stack monitoring. But we didn't see any change in the total used RAM of our machine.  
As per the documentation the ML job (ml processes) uses memory outside of JVM heap. Now we first observed the ram used while the job was in closed state and again while the job was in opened state and the datafeed was running, in both cases we were not able to see any changes in the used RAM figure. Can you explain this why is this happpening and why are we only able to see changes in JVM heap utilization and not in total RAM used.

---

<div class="post-metadata">

### Author: ![droberts195](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/droberts195/32/17692_2.png) [@droberts195](https://discuss.elastic.co/u/droberts195)
#### Post date: [February 23, 2023, 9:55am UTC](https://discuss.elastic.co/t/can-we-give-more-than-32gb-memory-to-dedicated-machine-learning-node/325159/4 "2023-02-23T09:55:58Z")

</div>

How are you measuring total used RAM?

---

<div class="post-metadata">

### Author: ![Umang\_Pachaury](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/umang_pachaury/32/113523_2.png) [@Umang\_Pachaury](https://discuss.elastic.co/u/Umang_Pachaury)
#### Post date: [February 23, 2023, 11:04am UTC](https://discuss.elastic.co/t/can-we-give-more-than-32gb-memory-to-dedicated-machine-learning-node/325159/5 "2023-02-23T11:04:27Z")

</div>

We are looking at the memory usage of the machine using free -m command.

---

<div class="post-metadata">

### Author: ![droberts195](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/droberts195/32/17692_2.png) [@droberts195](https://discuss.elastic.co/u/droberts195)
#### Post date: [February 23, 2023, 12:00pm UTC](https://discuss.elastic.co/t/can-we-give-more-than-32gb-memory-to-dedicated-machine-learning-node/325159/6 "2023-02-23T12:00:46Z")

</div>

Try using `top`. While jobs are running you should see `autodetect` processes in the list of processes that are using CPU. And `top` will also show that they are using memory as well.

---

<div class="post-metadata">

### Author: ![Umang\_Pachaury](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/umang_pachaury/32/113523_2.png) [@Umang\_Pachaury](https://discuss.elastic.co/u/Umang_Pachaury)
#### Post date: [February 23, 2023, 12:05pm UTC](https://discuss.elastic.co/t/can-we-give-more-than-32gb-memory-to-dedicated-machine-learning-node/325159/7 "2023-02-23T12:05:39Z")

</div>

Yes we did that . When our ml job was in opened state and when it was in closed state we examined the processes using that command. In both cases the figure was unchanged. But we could see some changes in kibana stack monitoring in case of jvm heap. But there was no change in the total ram used. As per my understanding the ml process should use the memory outside of jvm heap. so we should expect some changes in total ram used.

---

<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: [March 23, 2023, 12:06pm UTC](https://discuss.elastic.co/t/can-we-give-more-than-32gb-memory-to-dedicated-machine-learning-node/325159/8 "2023-03-23T12:06:22Z")

</div>

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