mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-27 20:01:15 -05:00
MINOR: haterm: increase thread-local pool size
QUIC uses many objects and the default pool size causes a lot of thrashing at the current request rate, taking ~12% CPU in pools. Let's increase it to 3MB, which allows us to reach around 11M req/s on a 80-core machine.
This commit is contained in:
parent
b007b7aa04
commit
0bb686a72d
1 changed files with 10 additions and 0 deletions
|
|
@ -330,6 +330,16 @@ void haproxy_init_args(int argc, char **argv)
|
|||
haterm_usage(progname);
|
||||
}
|
||||
|
||||
if (hbuf_is_null(&gbuf)) {
|
||||
/* use 3MB of local cache per thread mainly for QUIC */
|
||||
if (hbuf_alloc(&gbuf) == NULL) {
|
||||
ha_alert("failed to allocate a buffer.\n");
|
||||
goto leave;
|
||||
}
|
||||
hbuf_appendf(&gbuf, "global\n");
|
||||
hbuf_appendf(&gbuf, "\ttune.memory.hot-size 3145728\n");
|
||||
}
|
||||
|
||||
/* "global" section */
|
||||
if (!hbuf_is_null(&gbuf))
|
||||
hbuf_appendf(&mbuf, "%.*s\n", (int)gbuf.data, gbuf.area);
|
||||
|
|
|
|||
Loading…
Reference in a new issue