Files
Lukas Bernert 055cc7b956 docs: state disk limits as per-size minimums, align burst copy (#50016)
## What kind of change does this PR introduce?

Docs update: states disk limits as per-size minimums and aligns burst
copy across pages. Follow-up to #49996 (compute descriptions).

Fixes PROD-658

## What is the current behavior?

- The disk limits table and surrounding prose describe a narrower set of
configurations than a compute size can run on
- Burst thresholds are inconsistent across pages (three different
variants), and one section contradicts itself
- Burst is described as CPU behavior, when the burst users observe is
disk IO

## What is the new behavior?

- `shared-data/compute-disk-limits.ts`: Medium baseline throughput
adjusted to 39 MB/s: the lowest value across configurations
- `compute-and-disk`: disk limits presented as minimums ("at least");
burst described as disk IO drawing on a disk IO budget; consistent
thresholds: burst available up to 2XL, baseline equals maximum from 8XL
- Troubleshooting guides (`exhaust-disk-io`,
`failed-to-retrieve-tables`, `interpreting-supabase-grafana-io-charts`)
aligned to the same threshold; `failed-to-retrieve-tables` keeps the
~30-minutes-per-day burst window with the corrected size range
- Section anchors unchanged

## Self-review

- Values verified against the AWS EBS-optimized performance data
(`describe-instance-types`) for every configuration per size; content
cross-checked with the internal runbooks (linked in PROD-658)
- `supa-mdx-lint`: no findings in changed files
- `pnpm build:guides-markdown` clean; generated `.md` exports show the
new values and prose
- All changed pages verified rendering in the local dev app
- `pnpm typecheck` passes (shared-data + docs)
- Note: `compute-disk-limits.ts` also feeds Studio (disk validation, IO
budget tooltips). The only value change (Medium 43 → 39 MB/s) surfaces
there as one chart tooltip label; conservative direction.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Documentation**
- Clarified the differences between shared and dedicated CPU resources.
- Updated disk I/O guidance to explain baseline and burst limits as
minimums.
- Documented disk I/O bursting for compute sizes up to 2XL, including
expected duration and limitations.
- Clarified that 8XL and larger compute sizes have consistent
performance without burst capacity.
- Updated the documented baseline throughput for medium compute
resources.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-17 12:26:45 +02:00

184 lines
4.9 KiB
TypeScript

import { z } from 'zod'
/**
* Size-wide floor values for disk limits.
*
* Each value is the minimum across all configurations a compute size can run
* on, so every project gets at least these limits; the actual limits of a
* given project can be higher. Derived from the AWS EBS-optimized performance
* tables (https://instances.vantage.sh, mirroring
* `aws ec2 describe-instance-types`). Last verified: 2026-09-04.
*
* Throughput values are stored in MB/s (AWS lists Mbps, so we convert with toMBps).
*/
export type ComputeDiskLimit = {
name: string
baselineIops: number
maxIops: number
baselineThroughputMBps: number
maxThroughputMBps: number
}
const toMBps = (throughputMbps: number) => Math.round(throughputMbps / 8)
export const COMPUTE_DISK = {
ci_nano: {
name: 'Nano (free)',
baselineIops: 250,
maxIops: 11800,
baselineThroughputMBps: toMBps(43),
maxThroughputMBps: toMBps(2085),
},
ci_micro: {
name: 'Micro',
baselineIops: 500,
maxIops: 11800,
baselineThroughputMBps: toMBps(87),
maxThroughputMBps: toMBps(2085),
},
ci_small: {
name: 'Small',
baselineIops: 1000,
maxIops: 11800,
baselineThroughputMBps: toMBps(174),
maxThroughputMBps: toMBps(2085),
},
ci_medium: {
name: 'Medium',
baselineIops: 2000,
maxIops: 11800,
baselineThroughputMBps: toMBps(315),
maxThroughputMBps: toMBps(2085),
},
ci_large: {
name: 'Large',
baselineIops: 3600,
maxIops: 20000,
baselineThroughputMBps: toMBps(630),
maxThroughputMBps: toMBps(4750),
},
ci_xlarge: {
name: 'XL',
baselineIops: 6000,
maxIops: 20000,
baselineThroughputMBps: toMBps(1188),
maxThroughputMBps: toMBps(4750),
},
ci_2xlarge: {
name: '2XL',
baselineIops: 12000,
maxIops: 20000,
baselineThroughputMBps: toMBps(2375),
maxThroughputMBps: toMBps(4750),
},
ci_4xlarge: {
name: '4XL',
baselineIops: 20000,
maxIops: 20000,
baselineThroughputMBps: toMBps(4750),
maxThroughputMBps: toMBps(4750),
},
ci_8xlarge: {
name: '8XL',
baselineIops: 40000,
maxIops: 40000,
baselineThroughputMBps: toMBps(9500),
maxThroughputMBps: toMBps(9500),
},
ci_12xlarge: {
name: '12XL',
baselineIops: 50000,
maxIops: 50000,
baselineThroughputMBps: toMBps(14250),
maxThroughputMBps: toMBps(14250),
},
ci_16xlarge: {
name: '16XL',
baselineIops: 80000,
maxIops: 80000,
baselineThroughputMBps: toMBps(19000),
maxThroughputMBps: toMBps(19000),
},
ci_24xlarge: {
name: '24XL',
baselineIops: 120000,
maxIops: 120000,
baselineThroughputMBps: toMBps(30000),
maxThroughputMBps: toMBps(30000),
},
ci_24xlarge_optimized_cpu: {
name: '24XL - Optimized CPU',
baselineIops: 120000,
maxIops: 120000,
baselineThroughputMBps: toMBps(30000),
maxThroughputMBps: toMBps(30000),
},
ci_24xlarge_optimized_memory: {
name: '24XL - Optimized Memory',
baselineIops: 120000,
maxIops: 120000,
baselineThroughputMBps: toMBps(30000),
maxThroughputMBps: toMBps(30000),
},
ci_24xlarge_high_memory: {
name: '24XL - High Memory',
baselineIops: 120000,
maxIops: 120000,
baselineThroughputMBps: toMBps(30000),
maxThroughputMBps: toMBps(30000),
},
ci_48xlarge: {
name: '48XL',
baselineIops: 240000,
maxIops: 240000,
baselineThroughputMBps: toMBps(40000),
maxThroughputMBps: toMBps(40000),
},
ci_48xlarge_optimized_cpu: {
name: '48XL - Optimized CPU',
baselineIops: 240000,
maxIops: 240000,
baselineThroughputMBps: toMBps(40000),
maxThroughputMBps: toMBps(40000),
},
ci_48xlarge_optimized_memory: {
name: '48XL - Optimized Memory',
baselineIops: 240000,
maxIops: 240000,
baselineThroughputMBps: toMBps(40000),
maxThroughputMBps: toMBps(40000),
},
ci_48xlarge_high_memory: {
name: '48XL - High Memory',
baselineIops: 240000,
maxIops: 240000,
baselineThroughputMBps: toMBps(40000),
maxThroughputMBps: toMBps(40000),
},
} as const satisfies Record<string, ComputeDiskLimit>
export type ComputeDiskKey = keyof typeof COMPUTE_DISK
export const COMPUTE_BASELINE_IOPS = Object.fromEntries(
Object.entries(COMPUTE_DISK).map(([key, value]) => [key, value.baselineIops])
)
export const COMPUTE_MAX_IOPS = Object.fromEntries(
Object.entries(COMPUTE_DISK).map(([key, value]) => [key, value.maxIops])
)
export const COMPUTE_BASELINE_THROUGHPUT = Object.fromEntries(
Object.entries(COMPUTE_DISK).map(([key, value]) => [key, value.baselineThroughputMBps])
)
export const COMPUTE_MAX_THROUGHPUT = Object.fromEntries(
Object.entries(COMPUTE_DISK).map(([key, value]) => [key, value.maxThroughputMBps])
)
const computeInstanceAddonVariantIds = Object.keys(COMPUTE_DISK) as ComputeDiskKey[]
export const computeInstanceAddonVariantIdSchema = z.enum(
computeInstanceAddonVariantIds as [ComputeDiskKey, ...ComputeDiskKey[]]
)