# Support dedicated ML node

**URL:** <https://forum.opensearch.org/t/support-dedicated-ml-node/9329>\
**Category:** Machine Learning\
**Tags:** discuss, feature-request\
**Created:** [April 21, 2022, 5:09pm UTC](https://forum.opensearch.org/t/support-dedicated-ml-node/9329 "2022-04-21T17:09:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ylwu](https://avatars.discourse-cdn.com/v4/letter/y/a9a28c/32.png) [@ylwu](https://forum.opensearch.org/u/ylwu)\
**Post date:** [April 21, 2022, 5:09pm UTC](https://forum.opensearch.org/t/support-dedicated-ml-node/9329/1 "2022-04-21T17:09:58Z")

</div>

We have released a new ML plugin `ml-commons` in [1.3](https://github.com/opensearch-project/ml-commons/releases/tag/1.3.0.0) and we are planning to add more models.

ML model generally consuming more resources, especially for training process. We are going to support bigger ML models which might require more resources and special hardware like GPU. As OpenSearch doesn’t support ML node, we dispatch ML task to data node only. That means if user want to train some big model, they need to scale up all data nodes which seems costly and not reasonable. If we can support dedicated ML node, user don’t need to scale up their data node at all, just need to configure a new ML node(with different settings, more powerful instance type) and add it to cluster. And we can separate resource usage better by running ML task on dedicated node which can reduce impact to other tasks like search/ingestion.

And generally we can add a “computation” node for computation-intensive tasks like ML. And we may build more general solution like assigning/changing node role/tags on the fly. Check more details on this Github issue [Support dynamic node role · Issue #2877 · opensearch-project/OpenSearch · GitHub](https://github.com/opensearch-project/OpenSearch/issues/2877). Welcome any suggestions/questions! To keep the discussion easier, let’s post suggestions/questions on the Github issue directly.

---

<div class="post-metadata">

**Author:** ![jdbright](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/jdbright/32/4979_2.png) [@jdbright](https://forum.opensearch.org/u/jdbright)\
**Post date:** [October 6, 2022, 3:33pm UTC](https://forum.opensearch.org/t/support-dedicated-ml-node/9329/2 "2022-10-06T15:33:09Z")

</div>

Follow up to what @ylwu mentioned before, we closed the loop on ML nodes in 2.1.

> <https://github.com/opensearch-project/ml-commons/issues/79>
>
> \*\*Is your feature request related to a problem?\*\*
> We released ml-commons plugin… in OpenSearch 1.3. It supports training model and predicting. ML model generally consuming more resources, especially for training process. The community wants to support bigger ML models which might require more resources and special hardware like GPU. 
> 
> As OpenSearch doesn’t support ML node, we dispatch ML task to data node only. That means if user wants to train a large model, they need to scale up all data nodes which can be costly. And ML tasks will use shared resources on data nodes which may impact the core searching/indexing function.
> 
> \*\*What solution would you like?\*\*
> Support a dedicated ML node, users don’t need to scale up their data node at all. Instead just configure a new ML node (with different settings, more powerful instance type) and add it to cluster via the YAML file (requires a cluster restart). By doing so, users can separate resource usage better by running ML task on dedicated node which can reduce impact to other critical tasks like search/ingestion.
> 
> OpenSearch core will check node role when start node. If role is not built-in roles like \`data\` role, it will throw exception and node can't start. To support dedicated ML node, we have to remove this limitation in OpenSearch core. That is done with this PR which supports dynamic node role in OpenSearch https://github.com/opensearch-project/OpenSearch/pull/3436. 
> 
> With that we can enhance ml-commons code to dispatch task to \`ml\` nodes first. If no \`ml\` nodes we can fall back to data nodes.
> 
> 
> \*\*Do you have any additional context?\*\*
> \[Original Proposal\](https://github.com/opensearch-project/OpenSearch/issues/2877)
