mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-01-19 00:51:37 +01:00
The queue-based approach consists in forcing threads to wait away from the work area so as not to disturb the current writer, and to prepare the work by grouping them in a queue. The last arrived takes the head of the queue by placing its preinitialized ring cell there, becomes the queue's leader, informs itself about the amount of previously accumulated bytes so that when its turn comes, it immediately knows how much room is needed to be released. It can then take the whole queue with it, leaving an empty one for new threads to come while it's releasing the room needed to copy everything. By doing so we're cascading contention areas so that multiple parts can work in parallel. Note that we must never leave a write counter set to 0xFF at tail, and this happens when a message cannot fit and we give up, because in this case we're writing back tail_ofs, and only later we restore the counter. The solution here is to make a special case when we're going to drop the messages, and to write the readers count before restoring tail. This already shows a tremendous performance gain on ARM (385k -> 4.8M), thanks to the fact that now all waiting threads wait on the queue's head instead of polluting the tail lock. On x86_64, the EPYC sees a big boost at 24C48T (1.88M -> 3.82M) and a slowdown at 3C6T (6.0->4.45) though this one is much less of a concern as so few threads need less bandwidth than bigger counts.
The HAProxy documentation has been split into a number of different files for ease of use. Please refer to the following files depending on what you're looking for : - INSTALL for instructions on how to build and install HAProxy - BRANCHES to understand the project's life cycle and what version to use - LICENSE for the project's license - CONTRIBUTING for the process to follow to submit contributions The more detailed documentation is located into the doc/ directory : - doc/intro.txt for a quick introduction on HAProxy - doc/configuration.txt for the configuration's reference manual - doc/lua.txt for the Lua's reference manual - doc/SPOE.txt for how to use the SPOE engine - doc/network-namespaces.txt for how to use network namespaces under Linux - doc/management.txt for the management guide - doc/regression-testing.txt for how to use the regression testing suite - doc/peers.txt for the peers protocol reference - doc/coding-style.txt for how to adopt HAProxy's coding style - doc/internals for developer-specific documentation (not all up to date)
Description
Languages
C
98%
Shell
0.9%
Makefile
0.5%
Lua
0.2%
Python
0.2%