Merge "Merge branch 'stable-2.11'"
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt
index 923c72d..db52a1b 100644
--- a/Documentation/config-gerrit.txt
+++ b/Documentation/config-gerrit.txt
@@ -3427,7 +3427,7 @@
 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::
 +
diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/CommandExecutorQueueProvider.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/CommandExecutorQueueProvider.java
index bafb9ee..f78aba4 100644
--- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/CommandExecutorQueueProvider.java
+++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/CommandExecutorQueueProvider.java
@@ -35,7 +35,7 @@
       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;
     }