mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
When a reader doesn't read fast enough and causes drops, subsequent threads try to produce a "dropped" message. But it takes time to produce and emit this message, in part due to the use of chunk_printf() that relies on vfprintf() which has to parse the printf format, and during this time other threads may continue to increment the counter. This is the reason why this is currently performed in a loop. When reading what is received, it's common to see a large count followed by one or two single-digit counts, indicating that we could possibly have improved that by writing faster. Let's improve the situation a little bit. First we're now using a static message prefixed with enough space to write the digits, and a call to ultoa_r() fills these digits from right to left so that we don't have to process a format string nor perform a copy of the message. Second, we now re-check the counter immediately after having prepared the message so that we still get an opportunity for updating it. In order to avoid too long loops, this is limited to 10 iterations. Tests show that the number of single-digit "dropped" counters on output now dropped roughly by 15-30%. Also, it was observed that with 8 threads, there's almost never more than one retry. |
||
---|---|---|
.github | ||
addons | ||
admin | ||
dev | ||
doc | ||
examples | ||
include | ||
reg-tests | ||
scripts | ||
src | ||
tests | ||
.cirrus.yml | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.travis.yml | ||
BRANCHES | ||
BSDmakefile | ||
CHANGELOG | ||
CONTRIBUTING | ||
INSTALL | ||
LICENSE | ||
MAINTAINERS | ||
Makefile | ||
README | ||
SUBVERS | ||
VERDATE | ||
VERSION |
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)