mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
unbound: calculation is still suboptimal #3092
On the far side of the interval up to the next power of two the lock contention increases drastically, meaning 31 threads will only get 32 slabs etc.
This commit is contained in:
parent
c6de22b584
commit
0c751d732a
@ -86,7 +86,7 @@ function unbound_optimization()
|
||||
|
||||
$numprocs = intval(get_single_sysctl('kern.smp.cpus'));
|
||||
$numprocs = $numprocs <= 0 ? 1 : $numprocs;
|
||||
$numslabs = pow(2, ceil(log($numprocs, 2)));
|
||||
$numslabs = pow(2, floor(log($numprocs, 2)) + 1);
|
||||
|
||||
$optimization['number_threads'] = "num-threads: {$numprocs}";
|
||||
$optimization['msg_cache_slabs'] = "msg-cache-slabs: {$numslabs}";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user