diff options
author | Harald Musum <musum@verizonmedia.com> | 2020-03-28 07:56:25 +0100 |
---|---|---|
committer | Harald Musum <musum@verizonmedia.com> | 2020-03-28 07:56:25 +0100 |
commit | 36b801fcbfaf5cb28c777a4a9ea03261cb4cd79e (patch) | |
tree | bd85de0ded2005fec3aae2576eae31e146c574c0 /node-admin | |
parent | b9040088a05d54e43fee74c45d868d723e4c0e49 (diff) |
Reduce warmup time with one second to avoid lockstep with tick
Reduce the chance of using an extra tick when there are some milliseconds
left of warmup time
Diffstat (limited to 'node-admin')
-rw-r--r-- | node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java index 01f602d1a57..c4966b69acb 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java @@ -52,7 +52,8 @@ public class NodeAgentImpl implements NodeAgent { private static final long BYTES_IN_GB = 1_000_000_000L; // Container is started with uncapped CPU and is kept that way until the first successful health check + this duration - private static final Duration DEFAULT_WARM_UP_DURATION = Duration.ofMinutes(1); + // Subtract 1 second to avoid warmup coming in lockstep with tick time and always end up using an extra tick when there are just a few ms left + private static final Duration DEFAULT_WARM_UP_DURATION = Duration.ofMinutes(1).minus(Duration.ofSeconds(1)); private static final Logger logger = Logger.getLogger(NodeAgentImpl.class.getName()); |