Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Show warnings when instance is close to running out of disk io budget too

Long Hoangfd33c6717dff
diff --git a/studio/components/interfaces/BillingV2/Usage/Infrastructure.tsx b/studio/components/interfaces/BillingV2/Usage/Infrastructure.tsx
index cb9069b8868..e0b7f6f935e 100644
--- a/studio/components/interfaces/BillingV2/Usage/Infrastructure.tsx
+++ b/studio/components/interfaces/BillingV2/Usage/Infrastructure.tsx
@@ -140,6 +140,26 @@ const Infrastructure = ({
</a>
</Link>
</Alert>
+ ) : hasLatest && latestIoBudgetConsumption >= 80 ? (
+ <Alert
+ withIcon
+ variant="danger"
+ title="You are close to running out of Disk IO Budget"
+ >
+ <p className="mb-4">
+ Your workload has consumed {latestIoBudgetConsumption}% of your Disk IO
+ Budget. If you use up all your Disk IO Budget, your instance will reverted
+ to baseline performance. If you need consistent disk performance, consider
+ upgrading to a larger compute add-on.
+ </p>
+ <Link href={upgradeUrl}>
+ <a>
+ <Button type="danger">
+ {isFreeTier ? 'Upgrade project' : 'Change compute add-on'}
+ </Button>
+ </a>
+ </Link>
+ </Alert>
) : currentBillingCycleSelected && highestIoBudgetConsumption >= 100 ? (
<Alert
withIcon
@@ -159,6 +179,26 @@ const Infrastructure = ({
</a>
</Link>
</Alert>
+ ) : currentBillingCycleSelected && highestIoBudgetConsumption >= 80 ? (
+ <Alert
+ withIcon
+ variant="warning"
+ title="You were close to using all your IO Budget at least once"
+ >
+ <p className="mb-4">
+ Your workload has consumed {highestIoBudgetConsumption}% of your Disk IO
+ budget during this billing cycle. If you use up all your Disk IO Budget,
+ your instance will reverted to baseline performance. If you need consistent
+ disk performance, consider upgrading to a larger compute add-on.
+ </p>
+ <Link href={upgradeUrl}>
+ <a>
+ <Button type="warning">
+ {isFreeTier ? 'Upgrade project' : 'Change compute add-on'}
+ </Button>
+ </a>
+ </Link>
+ </Alert>
) : null}
<div className="space-y-1">
<p>Disk IO Bandwidth</p>