MINOR: config: change default MAX_TGROUPS to 16

This will allows nbtgroups > 1 to be declared in the config without
recompiling. The theoretical limit is 64, though we'd rather not push
it too far for now as some structures might be enlarged to be indexed
per group. Let's start with 16 groups max, allowing to experiment with
dual-socket machines suffering from up to 8 loosely coupled L3 caches.
It's a good start and doesn't engage us too far.
This commit is contained in:
Willy Tarreau 2022-07-15 21:46:55 +02:00
parent c6b596dcce
commit 856d56d2d2
2 changed files with 12 additions and 3 deletions

View File

@ -2267,7 +2267,11 @@ thread-group <group> [<thread-range>...]
thread-groups <number>
This setting is only available when support for threads was built in. It
makes HAProxy split its threads into <number> independent groups. At the
moment, the limit is 1 and is also the default value. See also "nbthread".
moment, the default value is 1. Thread groups make it possible to reduce
sharing between threads to limit contention, at the expense of some extra
configuration efforts. It is also the only way to use more than 64 threads
since up to 64 threads per group may be configured. The maximum number of
groups is configured at compile time and defaults to 16. See also "nbthread".
uid <number>
Changes the process's user ID to <number>. It is recommended that the user ID

View File

@ -39,9 +39,14 @@
#define MAX_THREADS LONGBITS
#endif
/* still limited to 1 group for now by default (note: group ids start at 1) */
/* theoretical limit is 64, though we'd rather not push it too far for now
* as some structures might be enlarged to be indexed per group. Let's start
* with 16 groups max, allowing to experiment with dual-socket machines
* suffering from up to 8 loosely coupled L3 caches. It's a good start and
* doesn't engage us too far.
*/
#ifndef MAX_TGROUPS
#define MAX_TGROUPS 1
#define MAX_TGROUPS 16
#endif
#define MAX_THREADS_PER_GROUP LONGBITS
#endif