# 7 Node Cluster with 3 dedicated master and 4 data nodes

**URL:** https://discuss.elastic.co/t/7-node-cluster-with-3-dedicated-master-and-4-data-nodes/103060
**Category:** Elasticsearch
**Created:** [October 6, 2017, 6:39pm UTC](https://discuss.elastic.co/t/7-node-cluster-with-3-dedicated-master-and-4-data-nodes/103060 "2017-10-06T18:39:34Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![samdash](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samdash/32/21628_2.png) [@samdash](https://discuss.elastic.co/u/samdash)
#### Post date: [October 6, 2017, 6:39pm UTC](https://discuss.elastic.co/t/7-node-cluster-with-3-dedicated-master-and-4-data-nodes/103060/1 "2017-10-06T18:39:35Z")

</div>

Hi All,

I am setting up 7 node cluster with 3 dedicated master only and 4 data only nodes, my hosts are not bare metal hosts but JVM's . What should be my memory setting for each host ( master and data nodes) .  
What should be my Xmx and Xmx setting ideally. is 8GB enough ? on each host

For now I will be having 3 indexes ( default 5 shards and 1 replica) only and data size for first 2 indexes would be around 10GB and 3rd index is less than 2 GB.

Later on we will be adding time series index which can grow over 40 GB , keeping these in mind, how should i design my memory requirements.

thanks

---

<div class="post-metadata">

### Author: ![Oferkes](https://avatars.discourse-cdn.com/v4/letter/o/9fc29f/32.png) [@Oferkes](https://discuss.elastic.co/u/Oferkes)
#### Post date: [October 6, 2017, 8:22pm UTC](https://discuss.elastic.co/t/7-node-cluster-with-3-dedicated-master-and-4-data-nodes/103060/2 "2017-10-06T20:22:31Z")

</div>

you should experiment, but still, try to get as close as you can to the recommended settings: balf the ram to eladtic, and no more than 30.5GB. as for the size of the indices you have, 5\*1 sounds too much for the overall size of data you have. try to stick to 30gb - 50gb per shard, do the math accordingly.

---

<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: [October 6, 2017, 8:48pm UTC](https://discuss.elastic.co/t/7-node-cluster-with-3-dedicated-master-and-4-data-nodes/103060/3 "2017-10-06T20:48:24Z")

</div>

You don't need huge heaps for master nodes, maybe 3-4GB each. You can also not follow the 50%:50% rule with them as they don't need to do any filesystem caching for Elasticsearch. 8GB for the data nodes sounds ok though.

> [@samdash](#):
>
> What should be my Xmx and Xmx setting ideally. is 8GB enough ? on each host

They should be the same, never set them separately but use `ES_HEAP_SIZE`.

---

<div class="post-metadata">

### Author: ![samdash](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samdash/32/21628_2.png) [@samdash](https://discuss.elastic.co/u/samdash)
#### Post date: [October 9, 2017, 6:08pm UTC](https://discuss.elastic.co/t/7-node-cluster-with-3-dedicated-master-and-4-data-nodes/103060/4 "2017-10-09T18:08:55Z")

</div>

So what i got is , Basically for master nodes 4GB RAM ( on 3 nodes) should be fine and however data nodes i need 8GB on 4 nodes , Is 5 shards and 1 replica fine for now? or should i reduce this as well ? considering later on my time series index will be about 40-50GB and growing.

---

<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: [October 9, 2017, 7:19pm UTC](https://discuss.elastic.co/t/7-node-cluster-with-3-dedicated-master-and-4-data-nodes/103060/5 "2017-10-09T19:19:56Z")

</div>

For that size I'd go with 1, maybe 2 shards and a replica set.

---

<div class="post-metadata">

### Author: ![samdash](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samdash/32/21628_2.png) [@samdash](https://discuss.elastic.co/u/samdash)
#### Post date: [October 9, 2017, 8:35pm UTC](https://discuss.elastic.co/t/7-node-cluster-with-3-dedicated-master-and-4-data-nodes/103060/6 "2017-10-09T20:35:26Z")

</div>

If i use 1 shards and 1 replica , wouldn't my data nodes be less as per the formula  
number of shards \* (number of replicas + 1) \>= number of data nodes  
1 \* ( 1 + 1) \> = 4 ( data nodes) ??  
and in future if i wanted to increase more data nodes, don't i have to honor above formula to have either more shards or replica's

---

<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: [October 9, 2017, 9:34pm UTC](https://discuss.elastic.co/t/7-node-cluster-with-3-dedicated-master-and-4-data-nodes/103060/7 "2017-10-09T21:34:44Z")

</div>

If you add more nodes then just change the template to increase the shard count for the next day's index.

At the volumes you are working at I wouldn't be too worried about 1 (primary) shard per node 🙂

---

<div class="post-metadata">

### Author: ![samdash](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samdash/32/21628_2.png) [@samdash](https://discuss.elastic.co/u/samdash)
#### Post date: [October 9, 2017, 10:50pm UTC](https://discuss.elastic.co/t/7-node-cluster-with-3-dedicated-master-and-4-data-nodes/103060/8 "2017-10-09T22:50:51Z")

</div>

Thanks i am little confused , having 1 shard and 1 replica does not satisfy the formula i was referring to  
1(shard) \* ( 1+1) \> = 4 ? , you mean to say i should reduce number of nodes as well to be inline with this formula?

---

<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: [October 9, 2017, 11:08pm UTC](https://discuss.elastic.co/t/7-node-cluster-with-3-dedicated-master-and-4-data-nodes/103060/9 "2017-10-09T23:08:45Z")

</div>

> [@warkolm](#):
>
> At the volumes you are working at I wouldn't be too worried about 1 (primary) shard per node 🙂

What I meant to say there is;

> At the volumes you are working at I wouldn't be too worried about 1 (primary) shard per _ **index** _ 🙂

So you end up with a primary on one node, the replica on the other.

---

<div class="post-metadata">

### Author: ![samdash](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samdash/32/21628_2.png) [@samdash](https://discuss.elastic.co/u/samdash)
#### Post date: [October 10, 2017, 5:24pm UTC](https://discuss.elastic.co/t/7-node-cluster-with-3-dedicated-master-and-4-data-nodes/103060/10 "2017-10-10T17:24:58Z")

</div>

so i can still have 3 master and 4 data nodes with just 1 shard and 1 replica?

---

<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: [October 10, 2017, 9:45pm UTC](https://discuss.elastic.co/t/7-node-cluster-with-3-dedicated-master-and-4-data-nodes/103060/11 "2017-10-10T21:45:23Z")

</div>

Yes. Because once you have more than 1 index each node will have a shard.

---

<div class="post-metadata">

### Author: ![samdash](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samdash/32/21628_2.png) [@samdash](https://discuss.elastic.co/u/samdash)
#### Post date: [October 10, 2017, 10:42pm UTC](https://discuss.elastic.co/t/7-node-cluster-with-3-dedicated-master-and-4-data-nodes/103060/12 "2017-10-10T22:42:52Z")

</div>

Perfect Thanks.

---

<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: [November 7, 2017, 10:42pm UTC](https://discuss.elastic.co/t/7-node-cluster-with-3-dedicated-master-and-4-data-nodes/103060/13 "2017-11-07T22:42:55Z")

</div>

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