# Resource allocation, data vs master nodes

**URL:** <https://discuss.elastic.co/t/resource-allocation-data-vs-master-nodes/35660>\
**Category:** Elasticsearch\
**Created:** [November 26, 2015, 11:51am UTC](https://discuss.elastic.co/t/resource-allocation-data-vs-master-nodes/35660 "2015-11-26T11:51:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zaid\_Amir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zaid_amir/32/54679_2.png) [@Zaid\_Amir](https://discuss.elastic.co/u/Zaid_Amir)\
**Post date:** [November 26, 2015, 11:51am UTC](https://discuss.elastic.co/t/resource-allocation-data-vs-master-nodes/35660/1 "2015-11-26T11:51:30Z")

</div>

Hi,

I was wondering how data only nodes work. Do they load the data an memory also? Do I need to allocate large memory machines for them?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 27, 2015, 6:44am UTC](https://discuss.elastic.co/t/resource-allocation-data-vs-master-nodes/35660/2 "2015-11-27T06:44:48Z")

</div>

> [@Zaid\_Amir](#):
>
> Do they load the data an memory also?

Can you explain what you mean here?

---

<div class="post-metadata">

**Author:** ![rusty](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@rusty](https://discuss.elastic.co/u/rusty)\
**Post date:** [November 27, 2015, 2:44pm UTC](https://discuss.elastic.co/t/resource-allocation-data-vs-master-nodes/35660/3 "2015-11-27T14:44:11Z")

</div>

It depends... You can load test data, search it and look at `/_stats&pretty` to get memory usage. I've never found any official formula of needed RAM computation. So every value should be calculated manually (with your data and data usage type). But beware of random generated data because measurement from it can be far from same measurement on real data,

In [my case](https://discuss.elastic.co/t/how-to-decrease-terms-memory-footprint/) I've got stuck with terms in memory (too many small events with distinct terms for long term retention period). Some guys stuck with field\_data with sorting or aggregations (this can be fixed by doc\_values).

---

<div class="post-metadata">

**Author:** ![Zaid\_Amir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zaid_amir/32/54679_2.png) [@Zaid\_Amir](https://discuss.elastic.co/u/Zaid_Amir)\
**Post date:** [December 1, 2015, 2:38pm UTC](https://discuss.elastic.co/t/resource-allocation-data-vs-master-nodes/35660/4 "2015-12-01T14:38:43Z")

</div>

What I meant to say was and I hope I make this as clear is possible.

If I specify the following in elasticsearch.yml  
node.master: false  
node.data: true

This should create a **data only** node.

My question is would this node also load the index in memory? Or would it act just as a storage location for master only nodes to fetch the data from and load them in memory, in the master node?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 1, 2015, 9:15pm UTC](https://discuss.elastic.co/t/resource-allocation-data-vs-master-nodes/35660/5 "2015-12-01T21:15:33Z")

</div>

> [@Zaid\_Amir](#):
>
> My question is would this node also load the index in memory? Or would it act just as a storage location for master only nodes to fetch the data from and load them in memory, in the master node?

ES doesn't load the index into memory, it may load some documents into memory but it doesn't keep them there.

Also if you only have one master then you shouldn't be running all queries and index requests via it, as if you OOM it then you lose your cluster.

---

<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:** [July 5, 2017, 11:34pm UTC](https://discuss.elastic.co/t/resource-allocation-data-vs-master-nodes/35660/6 "2017-07-05T23:34:20Z")

</div>


