]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: pipe/thread: maintain a per-thread local cache of recently used pipes
authorWilly Tarreau <w@1wt.eu>
Wed, 29 Jan 2020 10:05:50 +0000 (11:05 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 29 Jan 2020 10:12:07 +0000 (11:12 +0100)
commit160287b6760584eb1dc20d9032d6d49ed051ca0b
treeeec48859f799f9ffbcba9d5b22b2f92476ddbdc4
parenta945cfdfe05cd0d3b5898d8f650e03962643275d
MEDIUM: pipe/thread: maintain a per-thread local cache of recently used pipes

In order to completely remove the pipe locking cost and try to reuse
hot pipes, each thread now maintains a local cache of recently used pipes
that is no larger than its share (maxpipes/nbthreads). All extra pipes
are instead refilled into the global pool. Allocations are made from the
local pool first, and fall back to the global one before allocating one.
This completely removes the observed pipe locking cost at high bit rates,
which was still around 5-6%.
src/pipe.c