Merge "Change how default value of sshd.threads is computed"

This commit is contained in:
Martin Fick
2015-11-23 22:34:04 +00:00
committed by Gerrit Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -3430,7 +3430,7 @@ Number of threads to use when executing SSH command requests.
If additional requests are received while all threads are busy they If additional requests are received while all threads are busy they
are queued and serviced in a first-come-first-served order. are queued and serviced in a first-come-first-served order.
+ +
By default, 1.5x the number of CPUs available to the JVM. By default, 2x the number of CPUs available to the JVM.
[[sshd.batchThreads]]sshd.batchThreads:: [[sshd.batchThreads]]sshd.batchThreads::
+ +

View File

@@ -29,7 +29,7 @@ public class ThreadSettingsConfig {
@Inject @Inject
ThreadSettingsConfig(@GerritServerConfig Config cfg) { ThreadSettingsConfig(@GerritServerConfig Config cfg) {
int cores = Runtime.getRuntime().availableProcessors(); int cores = Runtime.getRuntime().availableProcessors();
sshdThreads = cfg.getInt("sshd", "threads", 3 * cores / 2); sshdThreads = cfg.getInt("sshd", "threads", 2 * cores);
httpdMaxThreads = cfg.getInt("httpd", "maxThreads", 25); httpdMaxThreads = cfg.getInt("httpd", "maxThreads", 25);
int defaultDatabasePoolLimit = sshdThreads + httpdMaxThreads + 2; int defaultDatabasePoolLimit = sshdThreads + httpdMaxThreads + 2;
databasePoolLimit = databasePoolLimit =