Jelajahi Sumber

raise large instance threshold maxRAM (#4263)

d-g-town 2 tahun lalu
induk
melakukan
f4b0ad8ca8
1 mengubah file dengan 3 tambahan dan 4 penghapusan
  1. 3 4
      dashboard/src/lib/hooks/useClusterResourceLimits.ts

+ 3 - 4
dashboard/src/lib/hooks/useClusterResourceLimits.ts

@@ -10,6 +10,7 @@ import convert from "convert";
 import { match } from "ts-pattern";
 import { z } from "zod";
 
+import { azureMachineTypeDetails } from "components/azureUtils";
 import {
   AWS_INSTANCE_LIMITS,
   GPU_INSTANCE_LIMIT,
@@ -17,8 +18,6 @@ import {
 
 import api from "shared/api";
 
-import { azureMachineTypeDetails } from "components/azureUtils";
-
 const DEFAULT_INSTANCE_CLASS = "t3";
 const DEFAULT_INSTANCE_SIZE = "medium";
 
@@ -312,9 +311,9 @@ export const useClusterResourceLimits = ({
           return Math.max(acc, curr.maxGPU);
         }, 0);
         let maxMultiplier = SMALL_INSTANCE_UPPER_BOUND;
-        // if the instance type has more than 4 GB ram, we use 90% of the ram/cpu
+        // if the instance type has more than 16 GB ram, we use 90% of the ram/cpu
         // otherwise, we use 75%
-        if (maxRAM > 4) {
+        if (maxRAM > 16) {
           maxMultiplier = LARGE_INSTANCE_UPPER_BOUND;
         }
         // round down to nearest 0.5 cores