mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-18 19:50:54 +00:00
haproxy public development tree
3e853ea74d
The malloc and free calls and especially the underlying mmap/munmap() can occasionally take a huge amount of time and even cause the thread to sleep. This is visible when haproxy is compiled with DEBUG_UAF which causes every single pool allocation/free to allocate and release pages. In this case, when using the locked pools, the watchdog can occasionally fire under high contention (typically requesting 40000 1M objects in parallel over 8 threads). Then, "perf top" shows that 50% of the CPU time is spent in mmap() and munmap(). The reason the watchdog fires is because some threads spin on the pool lock which is held by other threads waiting on mmap() or munmap(). This patch modifies this so that the pool lock is released during these syscalls. Not only this allows other threads to request try to allocate their data in parallel, but it also considerably reduces the lock contention. Note that the locked pools are only used on small architectures where high thread counts would not make sense, so this will not provide any benefit in the general case. However it makes the debugging versions way more stable, which is always appreciated. |
||
---|---|---|
.github/ISSUE_TEMPLATE | ||
contrib | ||
doc | ||
ebtree | ||
examples | ||
include | ||
reg-tests | ||
scripts | ||
src | ||
tests | ||
.cirrus.yml | ||
.gitignore | ||
.travis.yml | ||
BRANCHES | ||
CHANGELOG | ||
CONTRIBUTING | ||
INSTALL | ||
LICENSE | ||
MAINTAINERS | ||
Makefile | ||
README | ||
ROADMAP | ||
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)