As documented in [1], "waiting ..." means that task is ready to execute but is
waiting for an idle thread in its associated thread pool.
So you need to increase a thread pool.
In this case you are interested into the sshd.threads and sshd.batchThreads [2].
The show-queue command (for a newer Gerrit version) also provides the "-q" option
which will print the tasks grouped by the queue name. This should help you
to figure out which queue you should look at and which thread pool is processing that queue.
You will need to dig a bit in Gerrit's source code to determine the thread pool settings
but that should be too hard. Just grep the queue name from the output of the "-q"
option and it is very likely that the related thread pool size setting is in the same file.
An example related to exactly your question here:
$ ssh ... gerrit show-queue -w -q
...
Queue: SSH-Interactive-Worker
8de464a8 Dec-01 14:22 git-upload-pack '...'
...
$ git grep 'SSH-Interactive'
...
gerrit-sshd/src/main/java/com/google/gerrit/sshd/CommandExecutorQueueProvider.java: "SSH-Interactive-Worker");
$ vim gerrit-sshd/src/main/java/com/google/gerrit/sshd/CommandExecutorQueueProvider.java
...
final int cores = Runtime.getRuntime().availableProcessors();
poolSize = config.getInt("sshd", "threads", 3 * cores / 2);
batchThreads = config.getInt("sshd", "batchThreads", cores == 1 ? 1 : 2);
if (batchThreads > poolSize) {
poolSize += batchThreads;
}
int interactiveThreads = Math.max(1, poolSize - batchThreads);
interactiveExecutor = queues.createQueue(interactiveThreads,
"SSH-Interactive-Worker");
...
After that just read the documentation for these two settings [2]
:-)