diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-04-25 18:57:12 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-04-25 18:57:12 +0000 |
commit | c7b890535a3009e52e7227b883f2c9a16e59a740 (patch) | |
tree | bb68bdc548c6715a495e5aa910ea8e45ff1469ad /configserver/src | |
parent | 35decca41db6b9a44b24b6f7501c84d159ebd6a7 (diff) |
Let size of thread pool and Q follow number of cores on the machine where it is running.
If auto detected num worker threads will use number of #cores * 4, quesize will use #numWorkers * 4.
No changes of the default value in this commit.
Diffstat (limited to 'configserver/src')
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java b/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java index 2773659559b..0f141dee5b4 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java @@ -150,6 +150,8 @@ public class ModelContextImpl implements ModelContext { private final Optional<EndpointCertificateSecrets> endpointCertificateSecrets; private final double defaultTermwiseLimit; private final double defaultSoftStartSeconds; + private final double threadPoolSizeFactor; + private final double queueSizefactor; private final Optional<AthenzDomain> athenzDomain; public Properties(ApplicationId applicationId, @@ -186,6 +188,10 @@ public class ModelContextImpl implements ModelContext { .with(FetchVector.Dimension.APPLICATION_ID, applicationId.serializedForm()).value(); defaultTopKprobability = Flags.DEFAULT_TOP_K_PROBABILITY.bindTo(flagSource) .with(FetchVector.Dimension.APPLICATION_ID, applicationId.serializedForm()).value(); + threadPoolSizeFactor = Flags.DEFAULT_THREADPOOL_SIZE_FACTOR.bindTo(flagSource) + .with(FetchVector.Dimension.APPLICATION_ID, applicationId.serializedForm()).value(); + queueSizefactor = Flags.DEFAULT_QUEUE_SIZE_FACTOR.bindTo(flagSource) + .with(FetchVector.Dimension.APPLICATION_ID, applicationId.serializedForm()).value(); this.athenzDomain = athenzDomain; } @@ -238,8 +244,18 @@ public class ModelContextImpl implements ModelContext { @Override public double defaultTermwiseLimit() { return defaultTermwiseLimit; } + @Override + public double threadPoolSizeFactor() { + return threadPoolSizeFactor; + } + + @Override + public double queueSizeFactor() { + return queueSizefactor; + } + public double defaultSoftStartSeconds() { - return 0; + return defaultSoftStartSeconds; } @Override |