Enable sshd.batchThreads by default
Change default value of sshd.batchThreads from 0 to 1 or 2 depending on the core counts. When Gerrit runs on single code node 1 will be used as default, 2 otherwise. Change-Id: I4c04157e9edead9cdf0105aebc5d1658fa60f494 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
This commit is contained in:
@@ -35,7 +35,7 @@ public class CommandExecutorQueueProvider implements QueueProvider {
|
||||
final WorkQueue queues) {
|
||||
final int cores = Runtime.getRuntime().availableProcessors();
|
||||
poolSize = config.getInt("sshd", "threads", 3 * cores / 2);
|
||||
batchThreads = config.getInt("sshd", "batchThreads", 0);
|
||||
batchThreads = config.getInt("sshd", "batchThreads", cores == 1 ? 1 : 2);
|
||||
if (batchThreads > poolSize) {
|
||||
poolSize += batchThreads;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user