# CPU Core binding on Elastissearch

**URL:** <https://discuss.elastic.co/t/cpu-core-binding-on-elastissearch/144308>\
**Category:** Elasticsearch\
**Created:** [August 14, 2018, 9:09am UTC](https://discuss.elastic.co/t/cpu-core-binding-on-elastissearch/144308 "2018-08-14T09:09:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![amit.patra](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@amit.patra](https://discuss.elastic.co/u/amit.patra)\
**Post date:** [August 14, 2018, 9:09am UTC](https://discuss.elastic.co/t/cpu-core-binding-on-elastissearch/144308/1 "2018-08-14T09:09:46Z")

</div>

We have single node server with 256 GB RAM and 32 core processor. We are running elasticsearch , logstash and kibana.

We want to bind the no of cores (example 8) for elasticsearch process only. Is there any configuration in .yml file?

Awaiting for your valuable response.

Thanks,

---

<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:** [August 14, 2018, 11:14am UTC](https://discuss.elastic.co/t/cpu-core-binding-on-elastissearch/144308/2 "2018-08-14T11:14:13Z")

</div>

I think it's called `processors` and you can take a look at the link below  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-threadpool.html#processors](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-threadpool.html#processors)

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [August 14, 2018, 11:20am UTC](https://discuss.elastic.co/t/cpu-core-binding-on-elastissearch/144308/3 "2018-08-14T11:20:32Z")

</div>

That's not CPU core binding. That setting controls how Elasticsearch will size all it's internal thread pools, which is not CPU core binding. This is something only OS kernel can do.

---

<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:** [August 14, 2018, 11:40am UTC](https://discuss.elastic.co/t/cpu-core-binding-on-elastissearch/144308/4 "2018-08-14T11:40:52Z")

</div>

I could be wrong but if you review the page, you'll see the settings with regard to the relationship between the number of threads and the number of processors for each `thread pool` in a node.

To me, it provides info related to the question in a sense if they want to create a dedicated node for a specific type of operation. Also, it provides inside info about how ES determines the number of threads for each pool based on the number of processors (or cores) available within a system.

Lastly, this paragraph at the `processors setting` is very important to know when running multiple instances of ES in one physical machine

1. If you are running multiple instances of Elasticsearch on the same host but want Elasticsearch to size its thread pools as if it only has a fraction of the CPU, you should override the `processors` setting to the desired fraction (e.g., if you’re running two instances of Elasticsearch on a 16-core machine, set `processors` to 8). Note that this is an expert-level use-case and there’s a lot more involved than just setting the `processors` setting as there are other considerations like changing the number of garbage collector threads, pinning processes to cores, etc.

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [August 14, 2018, 11:43am UTC](https://discuss.elastic.co/t/cpu-core-binding-on-elastissearch/144308/5 "2018-08-14T11:43:31Z")

</div>

This is all correct, yet, this is not CPU core binding in the sense that threads are assigned to the be executed on specific CPU cores. This can only be done using OS kernel features such as containers, for instance.

---

<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:** [September 11, 2018, 11:43am UTC](https://discuss.elastic.co/t/cpu-core-binding-on-elastissearch/144308/6 "2018-09-11T11:43:34Z")

</div>

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