# Default number of worker processes

**URL:** https://discuss.tryton.org/t/default-number-of-worker-processes/2539
**Category:** Ideas
**Created:** [April 5, 2020, 8:50am UTC](https://discuss.tryton.org/t/default-number-of-worker-processes/2539 "2020-04-05T08:50:09Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jgras](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/jgras/32/285_2.png) [@jgras](https://discuss.tryton.org/u/jgras)
#### Post date: [April 5, 2020, 8:50am UTC](https://discuss.tryton.org/t/default-number-of-worker-processes/2539/1 "2020-04-05T08:50:09Z")

</div>

The default number of processes the worker starts equals to the number of cpus. Possibly as default this is to much. If there are many queues running in parallel and they are very heavy the machine hits its limits. Should we limit to the half by default?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [April 5, 2020, 9:03am UTC](https://discuss.tryton.org/t/default-number-of-worker-processes/2539/2 "2020-04-05T09:03:18Z")

</div>

I do not see why we should not try to take the most advantage of the machine by default but limit to half of it.

---

<div class="post-metadata">

### Author: ![jgras](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/jgras/32/285_2.png) [@jgras](https://discuss.tryton.org/u/jgras)
#### Post date: [April 5, 2020, 9:27am UTC](https://discuss.tryton.org/t/default-number-of-worker-processes/2539/3 "2020-04-05T09:27:20Z")

</div>

Half is stupid 🙂 Need to check why all the threads in my scenario are going up to 100% but they are blocking all other stuff on the machine. I know that there is a setting in config to limit the processes. I was thinking about this issue because I discovered it by accident and how to prevent this case by default.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [April 5, 2020, 9:43am UTC](https://discuss.tryton.org/t/default-number-of-worker-processes/2539/4 "2020-04-05T09:43:48Z")

</div>

You can run `trytond-worker` with a smaller priority.

---

<div class="post-metadata">

### Author: ![jgras](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/jgras/32/285_2.png) [@jgras](https://discuss.tryton.org/u/jgras)
#### Post date: [April 5, 2020, 10:07am UTC](https://discuss.tryton.org/t/default-number-of-worker-processes/2539/5 "2020-04-05T10:07:52Z")

</div>

Ok - we can close this than. I know how to prevent this case, I only was thinking if there could be an issue with that. If not, fine.

---

<div class="post-metadata">

### Author: ![bala4901](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/b/fbc32d/32.png) [@bala4901](https://discuss.tryton.org/u/bala4901)
#### Post date: [February 28, 2024, 3:09am UTC](https://discuss.tryton.org/t/default-number-of-worker-processes/2539/6 "2024-02-28T03:09:01Z")

</div>

May I know how to set the priority to worker to lower?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [February 28, 2024, 8:38am UTC](https://discuss.tryton.org/t/default-number-of-worker-processes/2539/7 "2024-02-28T08:38:50Z")

</div>

> **[Linux commands: How to manipulate process priority ](https://www.redhat.com/en/blog/manipulate-process-priority)**
>
> Managing processes in Linux is a fundamental concept that every good system administrator should be familiar with. A majority of the work you do with these p...
