]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: servers: Move to a per-thread idle connection cleanup task
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 28 May 2026 15:24:08 +0000 (17:24 +0200)
committerOlivier Houchard <cognet@ci0.org>
Mon, 8 Jun 2026 13:38:22 +0000 (15:38 +0200)
commit3c923d075c8c410b03201008481702a1be8041be
tree7662ed2d5e54a25641bfe6d88d0e35aadeac005a
parent6f8dab258379dd53e327433ffd890c6d3d6f89ed
MEDIUM: servers: Move to a per-thread idle connection cleanup task

Having a single task to take care of idle connection cleanup across all
servers leads to high contention. It uses a lock to maintain its tree of
servers to track, and then can acquire the idle_conns lock for each thread.
Instead, have one task per thread. Each thread will maintain its own
tree, so there will be no need for any lock, and it will just acquire
its own idle_conns lock, so it will lead to less contention.
This is a performance improvement, so backporting is optional, but may be
considered if it is worth it. That would require backporting commit
6f8dab258379dd53e327433ffd890c6d3d6f89ed too.
include/haproxy/server-t.h
include/haproxy/server.h
src/cfgparse.c
src/haproxy.c
src/server.c