From: Willy Tarreau Date: Tue, 30 Jun 2020 12:29:02 +0000 (+0200) Subject: MINOR: pools: increase MAX_BASE_POOLS to 64 X-Git-Tag: v2.1.8~18 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=e79b08a704c4960af599ee0320646ac3f8bf99c1;p=haproxy-2.1.git MINOR: pools: increase MAX_BASE_POOLS to 64 When not sharing pools (i.e. when building with -DDEBUG_DONT_SHARE_POOLS) we have about 47 pools right now, while MAX_BASE_POOLS is only 32, meaning that only the first 32 ones will benefit from a per-thread cache entry. This totally kills performance when pools are not shared (roughly -20%). Let's double the limit to gain some margin, and make it possible to set it as a build option. It might be useful to backport this to stable versions as they're likely to be affected as well. (cherry picked from commit daf8aa62a8d0210f81db5c93235da19d5ed22ab3) [wt: applied to include/common/memory.h] Signed-off-by: Willy Tarreau --- diff --git a/include/common/memory.h b/include/common/memory.h index 7d82c75..b3d752c 100644 --- a/include/common/memory.h +++ b/include/common/memory.h @@ -50,7 +50,9 @@ #define POOL_LINK(pool, item) ((void **)(item)) #endif -#define MAX_BASE_POOLS 32 +#ifndef MAX_BASE_POOLS +#define MAX_BASE_POOLS 64 +#endif struct pool_cache_head { struct list list; /* head of objects in this pool */