# Running multiple instance per physical host/machine

**URL:** <https://discuss.elastic.co/t/running-multiple-instance-per-physical-host-machine/44057>\
**Category:** Elasticsearch\
**Created:** [March 10, 2016, 4:38pm UTC](https://discuss.elastic.co/t/running-multiple-instance-per-physical-host-machine/44057 "2016-03-10T16:38:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![javadevmtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javadevmtl/32/45613_2.png) [@javadevmtl](https://discuss.elastic.co/u/javadevmtl)\
**Post date:** [March 10, 2016, 4:38pm UTC](https://discuss.elastic.co/t/running-multiple-instance-per-physical-host-machine/44057/1 "2016-03-10T16:38:38Z")

</div>

Using ES 2.2.0

Hi, I have a decently beefy machine, 16 core (hyper threaded to 32) 128GB RAM.

I decided to deploy 3 instances of of 20G RAM each... Rather then 1 instance of 30G. So this gives me an additional 30G of RAM.

My understanding is that ES will allocate it's internal thread pools what ever they maybe, by usually using the number of cores or even 2x cores?

So if one thread pool within a single instance is 32 threads and we deploy total of 3 instances. Does that mean now that there will be 96 threads contending for CPU resources?

---

<div class="post-metadata">

**Author:** ![thn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thn/32/8061_2.png) [@thn](https://discuss.elastic.co/u/thn)\
**Post date:** [March 10, 2016, 4:56pm UTC](https://discuss.elastic.co/t/running-multiple-instance-per-physical-host-machine/44057/2 "2016-03-10T16:56:19Z")

</div>

You need to set the number of processors per instance in the elasticsearch.yml file.

You can set it to

**processors: 4**

since the server has 16 cores. Otherwise, they will compete for resources as you said.

---

<div class="post-metadata">

**Author:** ![javadevmtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javadevmtl/32/45613_2.png) [@javadevmtl](https://discuss.elastic.co/u/javadevmtl)\
**Post date:** [March 10, 2016, 4:58pm UTC](https://discuss.elastic.co/t/running-multiple-instance-per-physical-host-machine/44057/3 "2016-03-10T16:58:43Z")

</div>

So 4 and not 8 right? Because it 16 physical and 32 hyper threaded.

---

<div class="post-metadata">

**Author:** ![thn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thn/32/8061_2.png) [@thn](https://discuss.elastic.co/u/thn)\
**Post date:** [March 10, 2016, 5:14pm UTC](https://discuss.elastic.co/t/running-multiple-instance-per-physical-host-machine/44057/4 "2016-03-10T17:14:19Z")

</div>

I thought you meant 16 total 🙂

8 should be fine too... as long as the total number of processors assigned to all instances less than the total system cores (HT included)

---

<div class="post-metadata">

**Author:** ![javadevmtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javadevmtl/32/45613_2.png) [@javadevmtl](https://discuss.elastic.co/u/javadevmtl)\
**Post date:** [March 10, 2016, 6:41pm UTC](https://discuss.elastic.co/t/running-multiple-instance-per-physical-host-machine/44057/5 "2016-03-10T18:41:32Z")

</div>

Cool this works good! 🙂

---

<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:09pm UTC](https://discuss.elastic.co/t/running-multiple-instance-per-physical-host-machine/44057/6 "2017-07-05T23:09:22Z")

</div>


