BUG/MEDIUM: threads: ignore max-threads-per-group when thread-groups is set

As documented, max-threads-per-group is the default number of threads
to arrange in a group before creating another group, and is only meant
to be used when thread-groups is not set.

However it was always enforced, so configs like:

   global
       thready-groups 2

which were sufficient in 3.2 and above to start with 64-128 threads
are now suddenly limited to 32 threads! Let's relax the limit when
thread-groups is set!

No backport is needed since this is only 3.4.
This commit is contained in:
Willy Tarreau 2026-05-28 16:48:51 +02:00
parent 617df441d6
commit f5847d11f7

View file

@ -1679,8 +1679,11 @@ void thread_detect_count(void)
if (global.nbthread)
thr_min = thr_max = global.nbthread;
if (global.nbtgroups)
if (global.nbtgroups) {
grp_min = grp_max = global.nbtgroups;
/* ignore max-threads-per-group if thread-groups is configured */
global.maxthrpertgroup = MAX_THREADS_PER_GROUP;
}
#if defined(USE_THREAD)
/* Adjust to boot settings if not forced */