Account Management and Data Governance · Topic 8 of 8
Resource Monitors, Credit Usage and ACCOUNT_USAGE
Cap warehouse spend with resource monitors, track serverless cost with budgets, calculate warehouse credits per second and query the ACCOUNT_USAGE views.
- 5 min
- Only ACCOUNTADMIN creates resource monitors. Actions: NOTIFY, SUSPEND, SUSPEND_IMMEDIATE.
- One account-level monitor; each warehouse belongs to at most one warehouse-level monitor.
- Monitors reset monthly by default, at midnight UTC.
What it is
Snowflake bills compute in credits. Most credits come from virtual warehouses, with more from serverless features and from cloud services above a daily allowance.
Monitoring and cost management means seeing where credits go and stopping surprises. The main tools are resource monitors for warehouses, budgets for broader spend, Snowsight's Cost Management pages and the ACCOUNT_USAGE views.
How it works
Resource monitors
A resource monitor sets a credit quota for an interval and takes actions at percentage thresholds. Only ACCOUNTADMIN can create one; it can grant MONITOR or MODIFY on a monitor to other roles.
| Action | Effect |
|---|---|
| NOTIFY | Sends a notification only |
| SUSPEND | Notifies and suspends the warehouses after running statements finish |
| SUSPEND_IMMEDIATE | Notifies, suspends the warehouses and cancels running statements |
A monitor can have one SUSPEND, one SUSPEND_IMMEDIATE and up to five NOTIFY actions. Thresholds can exceed 100%, for example SUSPEND at 100% and SUSPEND_IMMEDIATE at 110%.
CREATE RESOURCE MONITOR bi_monitor WITH CREDIT_QUOTA = 500
FREQUENCY = MONTHLY START_TIMESTAMP = IMMEDIATELY
TRIGGERS ON 80 PERCENT DO NOTIFY
ON 100 PERCENT DO SUSPEND
ON 110 PERCENT DO SUSPEND_IMMEDIATE;
ALTER WAREHOUSE bi_wh SET RESOURCE_MONITOR = bi_monitor;
The default schedule starts immediately and resets monthly; other frequencies are DAILY, WEEKLY, YEARLY and NEVER. Resets happen at midnight UTC.
| Level | Rule |
|---|---|
| Account monitor | Only one per account; covers all warehouses |
| Warehouse monitor | Many per account; each can cover several warehouses |
| Warehouse | Assigned to at most one warehouse-level monitor |
If either the account monitor or a warehouse monitor reaches a suspend threshold, the warehouse is suspended.
Resource monitors track only warehouses. They do not suspend serverless features such as Snowpipe, automatic clustering, materialized view maintenance or serverless tasks. Use a budget to watch those.
Cost and warehouse monitoring
Budgets set a monthly spending limit for the whole account or for a custom group of objects, and they include serverless features. A budget sends notifications when spend is projected to exceed the limit; it does not suspend anything.
In Snowsight, Admin » Cost Management shows credit consumption by warehouse, service type and time, and lets you manage budgets and resource monitors. Each warehouse also has a load chart that shows running and queued queries, which tells you whether to resize or add clusters.
Calculating virtual warehouse credit usage
Warehouse credits depend on size, running time and number of clusters. Each size up doubles the credits per hour.
| Size | Credits per hour (standard warehouse) |
|---|---|
| X-Small | 1 |
| Small | 2 |
| Medium | 4 |
| Large | 8 |
| X-Large | 16 |
| 2X-Large | 32 |
| 3X-Large | 64 |
| 4X-Large | 128 |
Billing is per second with a 60-second minimum each time a warehouse starts or resumes. A suspended warehouse uses no credits.
Worked examples:
- A Medium warehouse runs 30 minutes: 4 x 0.5 = 2 credits.
- An X-Small warehouse resumes, runs a 20-second query and suspends: billed as 60 seconds, 1 x 60 / 3600 = about 0.017 credits.
- A multi-cluster Large warehouse runs 3 clusters for 1 hour: 8 x 3 = 24 credits, because each running cluster bills separately.
Cloud services credits are charged only for the part of daily cloud services usage that exceeds 10% of that day's warehouse usage.
Most credit math questions are size credits x hours x clusters. Then check for the 60-second minimum on very short runs.
The ACCOUNT_USAGE schema
The shared SNOWFLAKE database holds the ACCOUNT_USAGE schema: views of object metadata and usage history for the whole account.
| Feature | ACCOUNT_USAGE | INFORMATION_SCHEMA |
|---|---|---|
| Scope | Whole account | One database (plus account objects visible to the role) |
| Latency | 45 minutes to 3 hours, depending on the view | None, real time |
| Retention | 1 year | 7 days to 6 months, depending on the view or function |
| Dropped objects | Included | Not included |
| View | Use |
|---|---|
| WAREHOUSE_METERING_HISTORY | Credits per warehouse per hour |
| METERING_DAILY_HISTORY | Daily credits by service type, including the cloud services adjustment |
| QUERY_HISTORY | Every query with time, warehouse, bytes scanned |
| LOGIN_HISTORY | Sign-in attempts and failures |
| ACCESS_HISTORY | Objects and columns each query read or wrote (Enterprise Edition) |
By default only ACCOUNTADMIN can query it. Grant IMPORTED PRIVILEGES on the SNOWFLAKE database, or SNOWFLAKE database roles such as USAGE_VIEWER, GOVERNANCE_VIEWER, OBJECT_VIEWER or SECURITY_VIEWER, to give other roles access.
Common mistakes
Expecting a resource monitor to stop Snowpipe. Monitors control warehouses only. Serverless costs need a budget.
Expecting a budget to suspend warehouses. Budgets notify; only resource monitors suspend.
Using INFORMATION_SCHEMA for last year's usage. It keeps at most months of history and omits dropped objects. ACCOUNT_USAGE keeps one year.
Ignoring the minimum charge. Each resume bills at least 60 seconds, so very short auto suspend settings on bursty workloads can add up.
What to remember for the exam
- Only ACCOUNTADMIN creates resource monitors. Actions: NOTIFY, SUSPEND, SUSPEND_IMMEDIATE.
- One account-level monitor; each warehouse belongs to at most one warehouse-level monitor.
- Monitors reset monthly by default, at midnight UTC.
- Budgets cover serverless features and only notify.
- Credits: XS 1, S 2, M 4, L 8 per hour, doubling each size; per-second billing with a 60-second minimum; multiply by clusters.
- Cloud services bill only above 10% of daily warehouse usage.
- ACCOUNT_USAGE: up to 3 hours latency, 1 year retention, includes dropped objects.
Check yourself
A Large warehouse with two clusters runs for 90 minutes. How many credits does it use?
8 credits per hour x 1.5 hours x 2 clusters = 24 credits.
What is the difference between SUSPEND and SUSPEND_IMMEDIATE?
SUSPEND lets running statements finish before suspending; SUSPEND_IMMEDIATE cancels them and suspends at once.
Which source should you use for a one-year history of warehouse credits, including dropped warehouses?
The ACCOUNT_USAGE view WAREHOUSE_METERING_HISTORY, which keeps one year and includes dropped objects.
Topic 8 of 8 in Account Management and Data Governance
Test yourself on Account Management and Data Governance
The full Snowflake SnowPro Core COF-C03 question bank has 845 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Snowflake. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.