From 2c5bc279d6e9b33ba7ffe362cd9baa3329ea59bc Mon Sep 17 00:00:00 2001
From: Clark Boylan <clark.boylan@gmail.com>
Date: Wed, 9 Feb 2022 11:04:54 -0800
Subject: [PATCH] Set Gerrit sshd.batchThreads to 0

Currently `gerrit show-queue -w -q` indicates we are only using 2
threads for service users and have 100 available for interactive users.
Unfortunately we really have three current classes of users: Humans,
Zuul, and everything else. We can't currently separate these into
different pools so instead we'll try using a single large pool and
sharing. To do that we set batchThreads to the special value of 0.

Change-Id: I08681a6b88683355ea5780ac452de903c8c8a7a3
---
 playbooks/roles/gerrit/templates/gerrit.config.j2 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/playbooks/roles/gerrit/templates/gerrit.config.j2 b/playbooks/roles/gerrit/templates/gerrit.config.j2
index 8ee10a1a74..46516437d5 100644
--- a/playbooks/roles/gerrit/templates/gerrit.config.j2
+++ b/playbooks/roles/gerrit/templates/gerrit.config.j2
@@ -44,6 +44,8 @@
 [sshd]
 	listenAddress = *:29418
 	threads = 100
+# batchThreads = 0 means share the 100 thread pool set above.
+	batchThreads = 0
 	idleTimeout = 3600
 	maxConnectionsPerUser = 96
 [httpd]