summaryrefslogtreecommitdiffstats
path: root/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/ContainerResources.java
diff options
context:
space:
mode:
Diffstat (limited to 'docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/ContainerResources.java')
-rw-r--r--docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/ContainerResources.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/ContainerResources.java b/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/ContainerResources.java
index 1b0b6380481..c3c4ca19555 100644
--- a/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/ContainerResources.java
+++ b/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/ContainerResources.java
@@ -44,16 +44,17 @@ public class ContainerResources {
/**
* Create container resources from required fields.
*
- * @param cpus the amount of vcpu that should be exclusively available to this container. This is a hard limit:
- * More than this amlunt will never be available. To allow an unlimited amount use 0.
- * @param cpuCores the amount of vcpu that should ideally be allocated to this container if there are no other
- * constraints on resources. To allow an unlimited amount use 0.
- * @param memoryGb the exact amount of memory that must be available to this container.
+ * @param maxVcpu the amount of vcpu that allocation policies should allocate exclusively to this container.
+ * This is a hard upper limit. To allow an unlimited amount use 0.
+ * @param minVcpu the minimal amount of vcpu dedicated to this container.
+ * To avoid dedicating any cpu at all, use 0.
+ * @param memoryGb the amount of memory that allocation policies should allocate to this container.
+ * This is a hard upper limit. To allow the container to allocate an unlimited amount use 0.
* @return the container resources encapsulating the parameters
*/
- public static ContainerResources from(double cpus, double cpuCores, double memoryGb) {
- return new ContainerResources(cpus,
- (int) Math.round(10 * cpuCores),
+ public static ContainerResources from(double maxVcpu, double minVcpu, double memoryGb) {
+ return new ContainerResources(maxVcpu,
+ (int) Math.round(10 * minVcpu),
(long) ((1L << 30) * memoryGb));
}