# Can We set a Node to be both ML Node and Content Node

**URL:** https://discuss.elastic.co/t/can-we-set-a-node-to-be-both-ml-node-and-content-node/319304
**Category:** Elasticsearch
**Tags:** elastic-stack-machine-learning
**Created:** [November 18, 2022, 1:09pm UTC](https://discuss.elastic.co/t/can-we-set-a-node-to-be-both-ml-node-and-content-node/319304 "2022-11-18T13:09:19Z")
**Posts on this page:** 4
**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: [November 18, 2022, 1:09pm UTC](https://discuss.elastic.co/t/can-we-set-a-node-to-be-both-ml-node-and-content-node/319304/1 "2022-11-18T13:09:19Z")

</div>

Hello Team,  
I am new to Elastic and Machine Learning but what I have gathered by documentation is that to Use machine learning ( For the production cluster) it is better to use a dedicated machine learning node. Now in case of my project to dedicate a separate node as a machine learning node it may require a separate hardware and our content storage capacity may take a hit. When I read the docs I got the idea that I can set my ML node to be a data node as well. Now I know that a dedicated master or a dedicated coordinator should not be set as ML node. We have dedicated data nodes (hot,warm and cold). So is my thought process correct that my dedicated ML node can also be used a data node.

Any help or guidance is appreciated.

Regards

---

<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: [November 18, 2022, 1:27pm UTC](https://discuss.elastic.co/t/can-we-set-a-node-to-be-both-ml-node-and-content-node/319304/2 "2022-11-18T13:27:35Z")

</div>

An ML node _can_ also be a data node. It _can_ also be a master node or a coordinating node too. In fact, if you run a single node cluster on your laptop for testing then it will have all these roles.

The reason we recommend not making joint ML/data nodes for serious production use relates to the memory on the machine outside of the JVM heap. ML nodes use memory outside of the JVM heap for running native analytics processes. Data nodes rely on memory outside of the JVM heap to be used as a file system cache by the operating system - without this OS level disk caching search performance will be poor. So, if you have a joint ML/data node then they'll be fighting over that memory outside of the JVM heap.

Whether it matters depends on whether you need optimum performance. If you are not pushing your cluster very hard and would rather save money by running fewer nodes then that's a decision you can make.

---

<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: [November 22, 2022, 7:40am UTC](https://discuss.elastic.co/t/can-we-set-a-node-to-be-both-ml-node-and-content-node/319304/3 "2022-11-22T07:40:52Z")

</div>

Thank you for clearing my query appreciate it. Will keep these things in mind and will proceed accordingly.  
Regards.

---

<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: [December 20, 2022, 7:41am UTC](https://discuss.elastic.co/t/can-we-set-a-node-to-be-both-ml-node-and-content-node/319304/4 "2022-12-20T07:41:47Z")

</div>

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