-
-
- Throughput must be between {minThroughput.toLocaleString()} and{' '}
- {maxThroughput?.toLocaleString()} MB/s based on your IOPS.
-
-
- Min throughput is at 125MB/s, while max throughput is at 0.25MB/s *
- IOPS or 1,000, whichever is lower
-
-
- {!form.formState.errors.throughput &&
- field.value !== undefined &&
- field.value > maxThroughputBasedOnCompute && (
-
- Note: Final usable throughput will be at{' '}
-
- {maxThroughputBasedOnCompute.toFixed(0)}
- {' '}
- MB/s based on your current compute size of {currentCompute?.name}
-
- )}
+
+ {watchedStorageType === 'io2' ? (
+ <>
+
+ IOPS must be{' '}
+ {watchedTotalSize >= 8
+ ? `between ${minIOPS} and ${maxIOPS.toLocaleString()} based on your disk size.`
+ : `at least ${minIOPS}`}
+
+
+ For io2 storage type, min IOPS is at {minIOPS}, while max IOPS is
+ at 1000 * disk size in GB or{' '}
+ {IOPS_RANGE[DiskType.IO2].max.toLocaleString()}, whichever is
+ lower
+
+ >
+ ) : (
+ <>
+
+ IOPS must be{' '}
+ {watchedTotalSize >= 8
+ ? `between ${minIOPS.toLocaleString()} and ${maxIOPS.toLocaleString()} based on your disk size.`
+ : `at least ${minIOPS.toLocaleString()}`}
+
+
+ For gp3 storage type, min IOPS is at {minIOPS} while max IOPS is
+ at 500 * disk size in GB or{' '}
+ {IOPS_RANGE[DiskType.GP3].max.toLocaleString()}, whichever is
+ lower
+
+ >
+ )}
- {!form.formState.errors.throughput && (
-
maxIopsBasedOnCompute && (
+
+ Note: Final usable IOPS will be at{' '}
+
+ {maxIopsBasedOnCompute.toLocaleString()}
+ {' '}
+ based on your current compute size of {currentCompute?.name}
+
+ )}
+
+ {!form.formState.errors.provisionedIOPS && (
+
@@ -834,108 +780,195 @@ export function DiskManagementForm() {
<>
- Amount of data read/written to the disk per second.
- Higher throughput suits applications with high data transfer needs.
+ Input/output operations per second.
+ Higher IOPS for high-throughput apps.
>
}
>
-
+
{
- setValue('throughput', e.target.valueAsNumber, {
+ setValue('provisionedIOPS', e.target.valueAsNumber, {
shouldDirty: true,
shouldValidate: true,
})
}}
- className="flex-grow font-mono rounded-r-none max-w-32"
- disabled={
- disableInput || disableIopsInput || watchedStorageType === 'io2'
- }
/>
)}
/>
+
+
+ {form.getValues('storageType') === 'gp3' && (
+
+ (
+
+
+
+
+ Throughput must be between {minThroughput.toLocaleString()}{' '}
+ and {maxThroughput?.toLocaleString()} MB/s based on your IOPS.
+
+
+ Min throughput is at 125MB/s, while max throughput is at
+ 0.25MB/s * IOPS or 1,000, whichever is lower
+
+
+ {!form.formState.errors.throughput &&
+ field.value !== undefined &&
+ field.value > maxThroughputBasedOnCompute && (
+
+ Note: Final usable throughput will be at{' '}
+
+ {maxThroughputBasedOnCompute.toFixed(0)}
+ {' '}
+ MB/s based on your current compute size of{' '}
+ {currentCompute?.name}
+
+ )}
+
+ {!form.formState.errors.throughput && (
+
+ )}
+
+ }
+ labelOptional={
+ <>
+ Amount of data read/written to the disk per second.
+
+ Higher throughput suits applications with high data transfer
+ needs.
+
+ >
+ }
+ >
+