Warehouse auto-suspend and auto-resume are essential features in Snowflake that help optimize both performance and costs by managing compute resources efficiently.
Auto-suspend is a configuration setting that determines how long a virtual warehouse remains active after completing its last query or…Warehouse auto-suspend and auto-resume are essential features in Snowflake that help optimize both performance and costs by managing compute resources efficiently.
Auto-suspend is a configuration setting that determines how long a virtual warehouse remains active after completing its last query or workload. When no queries are running and the specified idle time elapses, Snowflake automatically suspends the warehouse. This means the compute resources are released, and you stop incurring credits for that warehouse. The auto-suspend timeout can be set from a minimum of 60 seconds (1 minute) up to several hours, depending on your workload patterns. For sporadic query workloads, a shorter suspension period helps reduce costs, while frequently accessed warehouses might benefit from longer timeouts to avoid repeated startup overhead.
Auto-resume is the complementary feature that allows a suspended warehouse to automatically start up when a new query or statement is submitted against it. This ensures seamless user experience as users do not need to manually activate warehouses before running queries. The warehouse resumes within seconds, allowing queries to execute promptly.
These features work together to create an efficient resource management system. During periods of inactivity, warehouses suspend to eliminate unnecessary credit consumption. When workloads return, warehouses resume automatically to handle incoming requests.
Best practices for configuring these settings include analyzing your workload patterns to determine optimal suspension timeouts. Frequently used warehouses serving interactive dashboards might use longer timeouts (5-10 minutes) to maintain responsiveness, while batch processing warehouses with predictable schedules might use shorter timeouts or even be manually controlled.
Both settings can be configured during warehouse creation or modified later using ALTER WAREHOUSE commands. Setting AUTO_SUSPEND to NULL prevents automatic suspension, while setting AUTO_RESUME to FALSE requires manual warehouse activation.
Proper configuration of these features is fundamental to achieving cost optimization in Snowflake while maintaining the performance levels required by your organization.
Warehouse Auto-Suspend and Auto-Resume: Complete Guide
Why is Warehouse Auto-Suspend and Auto-Resume Important?
Warehouse auto-suspend and auto-resume are critical features for cost optimization in Snowflake. Since Snowflake charges based on compute credit consumption, warehouses that remain running when idle waste money. These features ensure you only pay for compute resources when they are actively processing queries.
What is Auto-Suspend?
Auto-suspend is a warehouse setting that automatically suspends (pauses) a virtual warehouse after a specified period of inactivity. When suspended, the warehouse consumes zero credits.
Key points about auto-suspend: • Default setting is 600 seconds (10 minutes) • Minimum value is 60 seconds (1 minute) or can be set to 0 to suspend at once • Setting it to NULL or 0 means the warehouse never auto-suspends • A warehouse is considered inactive when no queries are running or queued
What is Auto-Resume?
Auto-resume is a setting that automatically starts a suspended warehouse when a query is submitted to it. This provides a seamless user experience where users do not need to manually start warehouses.
Key points about auto-resume: • Enabled by default when creating a warehouse • When disabled, users must manually resume the warehouse using ALTER WAREHOUSE • Resume time is typically within seconds for most warehouse sizes
How They Work Together
1. A warehouse processes queries and becomes idle 2. After the auto-suspend timeout period, the warehouse suspends 3. When a new query arrives and auto-resume is enabled, the warehouse automatically resumes 4. The warehouse processes the query and the cycle repeats
ALTER WAREHOUSE my_warehouse SET AUTO_SUSPEND = 120;
Best Practices
• For ETL/batch workloads: Set auto-suspend to 60 seconds or lower to minimize idle time between jobs • For BI/interactive workloads: Consider longer suspend times (300-600 seconds) to avoid resume delays during active analysis sessions • Always enable auto-resume unless you have specific security or cost control requirements
Exam Tips: Answering Questions on Warehouse Auto-Suspend and Auto-Resume
Tip 1: Remember the default values - Auto-suspend defaults to 600 seconds (10 minutes), and auto-resume is enabled by default.
Tip 2: Know that suspended warehouses cost nothing. This is a fundamental concept for cost optimization questions.
Tip 3: Understand the minimum auto-suspend value is 60 seconds. Questions may try to trick you with values like 30 seconds.
Tip 4: Remember that auto-resume happens when a query is submitted, not based on a schedule.
Tip 5: For scenario-based questions about cost optimization, auto-suspend with shorter intervals is typically the correct answer for batch workloads.
Tip 6: Know that warehouse resume time is very fast (seconds), so auto-resume is recommended for most use cases.
Tip 7: If a question mentions a warehouse that keeps running and consuming credits, the solution typically involves configuring or enabling auto-suspend.