MINOR: pools: add a new global option "no-memory-trimming"
authorWilly Tarreau <w@1wt.eu>
Tue, 8 Mar 2022 09:41:40 +0000 (10:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 8 Mar 2022 09:54:07 +0000 (10:54 +0100)
commit4bcff9ba47e1c8f78405a1d6686edda68f254b44
treeb5270106cb5c3bc4feecf58726cd81a72d90f918
parentb82c42b2d1aa184b41508085790db65f4e35516f
MINOR: pools: add a new global option "no-memory-trimming"

Some users with very large numbers of connections have been facing
extremely long malloc_trim() calls on reload that managed to trigger
the watchdog! That's a bit counter-productive. It's even possible
that some implementations are not perfectly reliable or that their
trimming time grows quadratically with the memory used. Instead of
constantly trying to work around these issues, let's offer an option
to disable this mechanism, since nobody had been complaining in the
past, and this was only meant to be an improvement.

This should be backported to 2.4 where trimming on reload started to
appear.

(cherry picked from commit c4e56dc58c9ada7c4a8d585cb117a5b825916002)
[wt: minor context adj]
Signed-off-by: Willy Tarreau <w@1wt.eu>
doc/configuration.txt
src/pool.c