# Is there any way to define core number, filebeat should use?

**URL:** <https://discuss.elastic.co/t/is-there-any-way-to-define-core-number-filebeat-should-use/155041>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 1, 2018, 3:34pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-define-core-number-filebeat-should-use/155041 "2018-11-01T15:34:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![antonm](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@antonm](https://discuss.elastic.co/u/antonm)\
**Post date:** [November 1, 2018, 3:34pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-define-core-number-filebeat-should-use/155041/1 "2018-11-01T15:34:56Z")

</div>

max\_procs  
Sets the maximum number of CPUs that can be executing simultaneously. The default is the number of logical CPUs available in the system.

If i set "max\_procs: 1". Which core would be used ?  
Is there any way to specify exact core?  
For example core #0

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [November 1, 2018, 5:20pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-define-core-number-filebeat-should-use/155041/2 "2018-11-01T17:20:52Z")

</div>

@antonm can you describe your specific use case where you'd want filebeat pinned to a specific core?

---

<div class="post-metadata">

**Author:** ![antonm](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@antonm](https://discuss.elastic.co/u/antonm)\
**Post date:** [November 7, 2018, 8:11pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-define-core-number-filebeat-should-use/155041/3 "2018-11-07T20:11:40Z")

</div>

We run affinized applications which requires full control of all cores on the machine with exception of core 0 which it can share with outside apps. We always affinize all outside apps to core 0.  
Secondary, we want to be sure that is is not locking the file it is reading  
locally or remotely.  
Thirdly, it would be nice to control frequency of the threads.

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [November 7, 2018, 9:21pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-define-core-number-filebeat-should-use/155041/4 "2018-11-07T21:21:07Z")

</div>

@antonm have you considered using taskset [https://www.glennklockwood.com/hpc-howtos/process-affinity.html](https://www.glennklockwood.com/hpc-howtos/process-affinity.html) ?

Is there something missing there that would need to be heartbeat specific?

---

<div class="post-metadata">

**Author:** ![antonm](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@antonm](https://discuss.elastic.co/u/antonm)\
**Post date:** [November 21, 2018, 7:39pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-define-core-number-filebeat-should-use/155041/5 "2018-11-21T19:39:32Z")

</div>

Currently we are using ps.  
_$proclist = Get-Process -name filebeat_  
_foreach ($proc in $proclist) {$proc.ProcessorAffinity=0x1}_

Just wondered if there is a way to set this in filebeat.yml.

---

<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:** [December 19, 2018, 7:39pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-define-core-number-filebeat-should-use/155041/6 "2018-12-19T19:39:34Z")

</div>

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