taskmanager: spawn 2x the core count of threads by default

Because our multithreading code is generally terrible, this seems to
actually measurably improve throughput.
This commit is contained in:
Andrei Alexeyev 2023-05-08 04:21:28 +02:00
parent 18b221d473
commit d21e81e7b6
No known key found for this signature in database
GPG key ID: 72D26128040B9690

View file

@ -154,7 +154,7 @@ TaskManager *taskmgr_create(uint numthreads, ThreadPriority prio, const char *na
uint maxthreads = numcores * 4;
if(numthreads == 0) {
numthreads = numcores;
numthreads = numcores * 2;
} else if(numthreads > maxthreads) {
log_warn("Number of threads capped to %i (%i requested)", maxthreads, numthreads);
numthreads = maxthreads;