diff options
author | Martin Polden <mpolden@mpolden.no> | 2023-03-07 11:42:58 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2023-03-07 11:42:58 +0100 |
commit | 58e2f83c5bf98476fb7112d78a7f6fe786ad5426 (patch) | |
tree | 371f0adb32bc4c7e7507447df36a27e846828b4a /config-provisioning | |
parent | ad3f5edcb4d86886a7f6c52c26449e683e1d3a67 (diff) |
Set GPU cost
Diffstat (limited to 'config-provisioning')
-rw-r--r-- | config-provisioning/src/main/java/com/yahoo/config/provision/NodeResources.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/NodeResources.java b/config-provisioning/src/main/java/com/yahoo/config/provision/NodeResources.java index 8b2bf9fcbcc..8004d4dc951 100644 --- a/config-provisioning/src/main/java/com/yahoo/config/provision/NodeResources.java +++ b/config-provisioning/src/main/java/com/yahoo/config/provision/NodeResources.java @@ -15,7 +15,7 @@ public class NodeResources { private static final double cpuUnitCost = 0.11; private static final double memoryUnitCost = 0.011; private static final double diskUnitCost = 0.0004; - private static final double gpuUnitCost = 0; // TODO(mpolden): Decide cost of this + private static final double gpuUnitCost = 0.075; private static final NodeResources zero = new NodeResources(0, 0, 0, 0); private static final NodeResources unspecified = new NodeResources(0, 0, 0, 0); @@ -129,10 +129,6 @@ public class NodeResources { validate(memoryGb, "memory"); } - private double totalMemory() { - return count * memoryGb; - } - private boolean lessThan(GpuResources other) { return this.count < other.count || this.memoryGb < other.memoryGb; @@ -219,7 +215,7 @@ public class NodeResources { return (vcpu * cpuUnitCost) + (memoryGb * memoryUnitCost) + (diskGb * diskUnitCost) + - (gpuResources.totalMemory() * gpuUnitCost); + (gpuResources.count * gpuResources.memoryGb * gpuUnitCost); } public NodeResources withVcpu(double vcpu) { |