haproxy public development tree
Go to file
Willy Tarreau a7536ef9e1 MEDIUM: stick-table: only take the lock when needed in stktable_touch_with_exp()
As previously mentioned, this function currently holds an exclusive lock
on the table during all the time it take to check if the entry needs to
be updated and synchronized with peers. The reality is that many setups
do not use peers and that on highly loaded setups, the same entries are
hammered all the time so the key's expiration doesn't change between a
number of consecutive accesses.

With this patch we take a different approach. The function starts
without taking the lock, and will take it only if needed, keeping track
of it. This way we can avoid it most of the time, or even entirely.
Finally if the decrefcnt argument requires that the refcount is
decremented, we either do it using a non-atomic op if the table was
locked (since no other entry may touch it) or via an atomic under the
read lock only.

With this change alone, a 48-thread test with 3 trackers increased
from 193k req/s to 425k req/s, which is a 2.2x factor.
2022-10-12 14:19:05 +02:00
.github
addons CLEANUP: assorted typo fixes in the code and comments 2022-08-06 17:12:51 +02:00
admin
dev MINOR: flags/mux-h1: decode H1C and H1S flags 2022-09-15 11:01:59 +02:00
doc DOC: configuration: missing 'if' in tcp-request content example 2022-10-12 09:22:05 +02:00
examples
include MINOR: stick-table: move the write lock inside stktable_touch_with_exp() 2022-10-12 14:19:05 +02:00
reg-tests BUG/MINOR: checks: update pgsql regex on auth packet 2022-10-03 15:31:22 +02:00
scripts SCRIPTS: announce-release: update some URLs to https 2022-09-17 12:17:07 +02:00
src MEDIUM: stick-table: only take the lock when needed in stktable_touch_with_exp() 2022-10-12 14:19:05 +02:00
tests
.cirrus.yml CI: cirrus-ci: bump FreeBSD image to 13-1 2022-09-09 13:30:17 +02:00
.gitattributes
.gitignore CLEANUP: exclude udp-perturb with .gitignore 2022-09-16 15:47:04 +02:00
.mailmap
.travis.yml
BRANCHES
CHANGELOG [RELEASE] Released version 2.7-dev7 2022-10-03 15:20:38 +02:00
CONTRIBUTING
INSTALL
LICENSE
MAINTAINERS
Makefile CLEANUP: quic: create a dedicated quic_conn module 2022-10-03 16:25:17 +02:00
README
SUBVERS
VERDATE [RELEASE] Released version 2.7-dev7 2022-10-03 15:20:38 +02:00
VERSION [RELEASE] Released version 2.7-dev7 2022-10-03 15:20:38 +02:00

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)