mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-10-30 08:00:59 +01:00
We really want to let the readers and writers act on different areas, so we want to have the tail and the head on separate cache lines, themselves separate from the rest of the ring. Doing so improves the performance from 2.15 to 2.35M msg/s at 48 threads on a 24-core EPYC. This increases the header space from 32 to 192 bytes when threads are enabled. But since we already have the header size available in the file, haring remains able to detect the aligned vs unaligned formats and call dump_v2a() when aligned is detected.
This needs to be built from the top makefile, for example : make dev/haring/haring If HAProxy is built with special options such -DDEBUG_THREAD or with multi-threading support enabled (which changes the ring's header size), it can be worth reusing the same build options for haring, usually they will remain compatible, and will simplify the handling of different file layouts, at the expense of dragging more dependencies into the executable.