Willy Tarreau dd8ea5d928 MEDIUM: ring: align the head and tail fields in the ring_storage structure
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.
2024-03-25 17:34:19 +00:00
..

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.