]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: listener: refine the default MAX_ACCEPT from 64 to 4
authorWilly Tarreau <w@1wt.eu>
Fri, 19 Feb 2021 14:50:27 +0000 (15:50 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 19 Feb 2021 15:02:04 +0000 (16:02 +0100)
commit66161326fd120652557d419810b1323405d7859d
treeea6a4aafe85342378eb7463bd0afac35c94151ad
parent4327d0ac00fd29622e8558a206dfbf23eaeb9fe9
MINOR: listener: refine the default MAX_ACCEPT from 64 to 4

The maximum number of connections accepted at once by a thread for a single
listener used to default to 64 divided by the number of processes but the
tasklet-based model is much more scalable and benefits from smaller values.
Experimentation has shown that 4 gives the highest accept rate for all
thread values, and that 3 and 5 come very close, as shown below (HTTP/1
connections forwarded per second at multi-accept 4 and 64):

 ac\thr|    1     2    4     8     16
 ------+------------------------------
      4|   80k  106k  168k  270k  336k
     64|   63k   89k  145k  230k  274k

Some tests were also conducted on SSL and absolutely no change was observed.

The value was placed into a define because it used to be spread all over the
code.

It might be useful at some point to backport this to 2.3 and 2.2 to help
those who observed some performance regressions from 1.6.
doc/configuration.txt
include/haproxy/defaults.h
src/cfgparse.c
src/listener.c
src/log.c