# Multi process or multi treaded

**URL:** <https://discourse.haproxy.org/t/multi-process-or-multi-treaded/7409>\
**Category:** Help!\
**Created:** [February 16, 2022, 7:25pm UTC](https://discourse.haproxy.org/t/multi-process-or-multi-treaded/7409 "2022-02-16T19:25:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lserranov](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@lserranov](https://discourse.haproxy.org/u/lserranov)\
**Post date:** [February 16, 2022, 7:25pm UTC](https://discourse.haproxy.org/t/multi-process-or-multi-treaded/7409/1 "2022-02-16T19:25:53Z")

</div>

What is the preference these days? Shall I go with multiprocess or multithreaded configuration or a mix of both?

I expect 500K connection in an SSL termination/Loadbalancing configuration.

Thanks!

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [February 16, 2022, 8:21pm UTC](https://discourse.haproxy.org/t/multi-process-or-multi-treaded/7409/2 "2022-02-16T20:21:31Z")

</div>

Multi process mode has been deprecated a long time ago and completely removed in 2.5. So you don’t have a choice, actually. It’s multi threading.

---

<div class="post-metadata">

**Author:** ![lserranov](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@lserranov](https://discourse.haproxy.org/u/lserranov)\
**Post date:** [February 16, 2022, 9:14pm UTC](https://discourse.haproxy.org/t/multi-process-or-multi-treaded/7409/4 "2022-02-16T21:14:23Z")

</div>

Thanks @lukastribus , is there any high level guidance in terms of how many threads per CPU are needed or it is case by case?

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [February 16, 2022, 9:24pm UTC](https://discourse.haproxy.org/t/multi-process-or-multi-treaded/7409/5 "2022-02-16T21:24:00Z")

</div>

Not more than one thread per CPU core.

Depending on how much time you want to invest in low level NIC, kernel and haproxy settings, you could pin haproxy and network interrupts to specific cores on the same NUMA node, but you only want to do that if it is really necessary.

Checkout this thread after post 16:

> [@Haproxy uses a lot of memory with many backend servers](https://discourse.haproxy.org/t/haproxy-uses-a-lot-of-memory-with-many-backend-servers/2589/18):
>
> I really appreciate your advices because I’m wandering at Google for clarifying how to check the effect of the number of servers at backend. Thank you so much. I summarize your advices. Rather than the number of servers, the concurrent connections(Memory Usage) and the traffic rate, the the number of TLS handshakes per second(CPU Usage) will consume the most of computing resources, CPU and RAM. Servers do not waste a buffer anymore when the checks are not running. And NIC and HAProxy should r…
