Merge "Enable sshd.batchThreads by default"

This commit is contained in:
Shawn Pearce 2015-11-09 20:55:59 +00:00 committed by Gerrit Code Review
commit b3097a3ac6
2 changed files with 2 additions and 2 deletions

View File

@ -3427,7 +3427,7 @@ If the number of threads requested for non-interactive users is larger
than the total number of threads allocated in sshd.threads, then the
value of sshd.threads is increased to accommodate the requested value.
+
By default, 0.
By default is 1 on single core node, 2 otherwise.
[[sshd.streamThreads]]sshd.streamThreads::
+

View File

@ -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;
}