]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: listener: only store conn counts for local threads
authorWilly Tarreau <w@1wt.eu>
Tue, 28 Feb 2023 09:25:57 +0000 (10:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 28 Feb 2023 09:28:47 +0000 (10:28 +0100)
commitfea8c1911949692f3c5db6a840affa234a32a8b1
tree641f4401b366b590d490cf2db5a2f0ca674704da
parent061754b249b9903913d6766c1ab31bb393ee5c0d
CLEANUP: listener: only store conn counts for local threads

The listeners have a thr_conn[] array indexed on the thread number that
is used during connection redispatching to know what threads are the least
loaded. Since we introduced thread groups, and based on the fact that a
listener may only belong to one group, there's no point storing counters
for all threads, we just need to store them for all threads in the group.

Doing so reduces the struct listener from 1500 to 632 bytes. This may be
backported to 2.7 to save a bit of resources.
include/haproxy/listener-t.h
src/listener.c