mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-12 05:32:16 -04:00
BUG/MEDIUM: init/threads: consider epoll_fd/pipes for automatic maxconn calculation
This is the equivalent of the previous patch for the automatic maxconn calculation. This doesn't need any backport.
This commit is contained in:
parent
2c58b41c96
commit
3f20085617
1 changed files with 6 additions and 0 deletions
|
|
@ -1478,6 +1478,12 @@ static int compute_ideal_maxconn()
|
|||
/* subtract listeners and checks */
|
||||
remain -= global.maxsock;
|
||||
|
||||
/* one epoll_fd/kqueue_fd per thread */
|
||||
remain -= global.nbthread;
|
||||
|
||||
/* one wake-up pipe (2 fd) per thread */
|
||||
remain -= 2 * global.nbthread;
|
||||
|
||||
/* Fixed pipes values : we only subtract them if they're not larger
|
||||
* than the remaining FDs because pipes are optional.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue