]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: server: align server struct to 64 bytes
authorWilly Tarreau <w@1wt.eu>
Wed, 13 Aug 2025 13:07:55 +0000 (15:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 13 Aug 2025 15:37:11 +0000 (17:37 +0200)
commitcfdab917feeef81e16dfb9e14710c92024d0ada3
tree9aa0514615b133f4303418061843700da8b75cba
parenta469356268f463d24b9d0e71e0cfa5826ac02a5c
MINOR: server: align server struct to 64 bytes

Several times recently, it was noticed that some benchmarks would
highly vary depending on the position of certain fields in the server
struct, and this could even vary between runs.

The server struct does have separate areas depending on the user cases
and hot/cold aspect of the members stored there, but the areas are
artificially kept apart using fixed padding instead of real alignment,
which has the first sad effect of artificially inflating the struct,
and the second one of misaligning it.

Now that we have all the necessary tools to keep them aligned, let's
just do it. The struct has shrunk from 4160 to 4032 bytes on 64-bit
systems, 152 of which are still holes or padding.
include/haproxy/server-t.h
include/haproxy/server.h