Resource Monitors & Budgets
Snowflake's consumption-based pricing model gives you flexibility, but it also means costs can escalate quickly if you're not paying attention. Resource monitors and budgets are your primary tools for keeping spend under control. In this lesson, we'll walk through both mechanisms and build a monitoring strategy from scratch.
Understanding the Credit Consumption Model
Everything compute-related in Snowflake is measured in credits. When a warehouse is running, it consumes credits based on its size — regardless of whether it's actively executing queries or just sitting idle in a "running" state.
Credits are billed per second, with a 60-second minimum each time a warehouse resumes. This means a warehouse that starts up, runs a 5-second query, and suspends still costs you 60 seconds of credit consumption.
Credit Costs by Warehouse Size
| Warehouse Size | Credits per Hour | Nodes |
|---|---|---|
| X-Small (XS) | 1 | 1 |
| Small (S) | 2 | 2 |
| Medium (M) | 4 | 4 |
| Large (L) | 8 | 8 |
| X-Large (XL) | 16 | 16 |
| 2X-Large | 32 | 32 |
| 3X-Large | 64 | 64 |
| 4X-Large | 128 | 128 |
| 5X-Large | 256 | 256 |
| 6X-Large | 512 | 512 |
Each step up doubles the compute power and the cost. A Medium warehouse running for one hour costs the same as an X-Small running for four hours. The key question is always: does the bigger warehouse finish the work more than proportionally faster?
Resource Monitors
Resource monitors let you set credit quotas and define what happens when those quotas are reached. They're your guardrails against runaway costs.
Creating a Resource Monitor
CREATE RESOURCE MONITOR cost_control_monitor
WITH
CREDIT_QUOTA = 5000
FREQUENCY = MONTHLY
START_TIMESTAMP = IMMEDIATELY
TRIGGERS
ON 75 PERCENT DO NOTIFY
ON 90 PERCENT DO NOTIFY
ON 100 PERCENT DO SUSPEND
ON 110 PERCENT DO SUSPEND_IMMEDIATELY;
Let's break down each component:
- CREDIT_QUOTA: The total number of credits allowed for the monitoring period.
- FREQUENCY: How often the quota resets —
DAILY,WEEKLY,MONTHLY, orYEARLY. - START_TIMESTAMP: When monitoring begins. Use
IMMEDIATELYor a specific timestamp. - TRIGGERS: The actions taken at various consumption thresholds.
Trigger Actions
There are three trigger actions available:
| Action | Behavior |
|---|---|
NOTIFY | Sends a notification to account admins. Queries continue running. |
SUSPEND | Prevents new queries from starting. Currently running queries finish. |
SUSPEND_IMMEDIATELY | Cancels all running queries and suspends the warehouse immediately. |
The SUSPEND_IMMEDIATELY action is aggressive — use it only as a final safety net. Killing running queries mid-execution can leave downstream processes in a bad state.
Assigning Resource Monitors
You can assign a resource monitor at the warehouse level or the account level:
-- Assign to a specific warehouse
ALTER WAREHOUSE analytics_wh
SET RESOURCE_MONITOR = cost_control_monitor;
-- Assign at the account level (ACCOUNTADMIN only)
ALTER ACCOUNT SET RESOURCE_MONITOR = account_wide_monitor;
Account-level monitors track total credit consumption across all warehouses. Warehouse-level monitors track only that specific warehouse. You can layer both for defense in depth.
Snowflake Budgets
Budgets are a newer, more flexible approach to spending management. Unlike resource monitors, budgets can track spending across warehouses, serverless features, and even specific objects tagged for cost attribution.
Creating a Budget
-- Create a custom budget for the analytics team
CALL SNOWFLAKE.LOCAL.ACCOUNT_ROOT_BUDGET!CREATE_BUDGET(
'ANALYTICS_BUDGET',
5000, -- spending limit in credits
'MONTHLY', -- reset frequency
'analytics_wh, reporting_wh' -- tracked warehouses
);
You can also create budgets that track spending by tags, which ties nicely into chargeback models we'll cover in a later lesson:
-- Set a spending limit on a custom budget
CALL SNOWFLAKE.LOCAL.ACCOUNT_ROOT_BUDGET!SET_SPENDING_LIMIT(2000);
Budget vs. Resource Monitor
| Feature | Resource Monitors | Budgets |
|---|---|---|
| Track warehouse credits | Yes | Yes |
| Track serverless costs | No | Yes |
| Tag-based tracking | No | Yes |
| Suspend warehouses | Yes | No |
| Email notifications | Yes | Yes |
| Granularity | Warehouse or account | Flexible |
Resource monitors are about enforcement — they can actually stop warehouses. Budgets are about visibility and planning. In practice, you'll likely use both.
Monitoring Views
Snowflake provides system views for tracking resource monitor and budget status:
-- Check resource monitor status
SELECT *
FROM SNOWFLAKE.ACCOUNT_USAGE.RESOURCE_MONITORS
ORDER BY created_on DESC;
-- View current credit usage against monitors
SHOW RESOURCE MONITORS;
-- Query budget spending
SELECT *
FROM SNOWFLAKE.ACCOUNT_USAGE.BUDGET_SPENDING_EVENTS
WHERE BUDGET_NAME = 'ANALYTICS_BUDGET'
AND EVENT_TIMESTAMP >= DATEADD('day', -30, CURRENT_TIMESTAMP())
ORDER BY EVENT_TIMESTAMP DESC;
Putting It All Together
Here's a complete monitoring strategy for a typical organization:
-- 1. Account-level safety net
CREATE RESOURCE MONITOR account_safety_net
WITH
CREDIT_QUOTA = 20000
FREQUENCY = MONTHLY
START_TIMESTAMP = IMMEDIATELY
TRIGGERS
ON 80 PERCENT DO NOTIFY
ON 95 PERCENT DO SUSPEND
ON 100 PERCENT DO SUSPEND_IMMEDIATELY;
ALTER ACCOUNT SET RESOURCE_MONITOR = account_safety_net;
-- 2. Per-team warehouse monitors
CREATE RESOURCE MONITOR etl_monitor
WITH
CREDIT_QUOTA = 8000
FREQUENCY = MONTHLY
START_TIMESTAMP = IMMEDIATELY
TRIGGERS
ON 50 PERCENT DO NOTIFY
ON 75 PERCENT DO NOTIFY
ON 100 PERCENT DO SUSPEND;
ALTER WAREHOUSE etl_wh SET RESOURCE_MONITOR = etl_monitor;
-- 3. Development warehouse with tight limits
CREATE RESOURCE MONITOR dev_monitor
WITH
CREDIT_QUOTA = 500
FREQUENCY = WEEKLY
START_TIMESTAMP = IMMEDIATELY
TRIGGERS
ON 90 PERCENT DO NOTIFY
ON 100 PERCENT DO SUSPEND;
ALTER WAREHOUSE dev_wh SET RESOURCE_MONITOR = dev_monitor;
Start with generous quotas and tighten them over a few billing cycles as you learn your actual consumption patterns. The goal isn't to block work — it's to prevent surprises on the invoice.
Key Takeaways
- Credits are consumed per second with a 60-second minimum per warehouse resume cycle.
- Resource monitors enforce hard limits and can suspend warehouses when quotas are reached.
- Layer your monitors: account-level for safety, warehouse-level for team accountability.
- Budgets offer broader visibility including serverless costs, but don't enforce suspensions.
- Review your
RESOURCE_MONITORSview and budget spending events regularly — don't set and forget.