Using Auto-Suspend for a “Well Managed” Warehouse Strategy
December 6, 2023
Whether you’re just starting in Snowflake, or are an experienced administrator, you’ll likely seek tools and strategies to maintain a cost-effective and efficient infrastructure. One of the best practices mentioned in a previous blog post "Optimizing Warehouses for Cost and Performance” is setting the right auto-suspend time by paying attention to warehouse trends. Capital One has seen great cost benefits in reducing the default auto-suspend time for particular warehouses. First, users will need to learn how to optimize your warehouse settings.
How are warehouse costs calculated?
Snowflake warehouses consume credits per second, and a warehouse runs with a minimum charge of one minute. The size and number of compute resources determine the amount of credits charged for a warehouse. This table from Snowflake represents how many total credits will be used for an hour based on the warehouse size – beginning with an X-Small warehouse consuming one credit up to a 2X-large warehouse using 32 credits.
What is an ‘idle’ warehouse?
A warehouse consumes Snowflake credits while running, even without processing queries. An idle warehouse is currently running but is not actively running workloads. Ideally, you want to shut down additional charges unless you expect a steady workload of queries in the same warehouse, where you can take advantage of reusing cache.
What is Snowflake warehouse auto-suspend?
To help minimize the cost of unused warehouses, Snowflake offers an auto-suspend setting. Warehouse auto-suspend automatically stops idle warehouses from consuming credits by temporarily shutting down all running servers if there’s no activity for a specified time. Servers will resume running when a new workload has been submitted to the warehouse and compute resources are needed.
The default setting for auto-suspend is 10 minutes and is enabled automatically. Given the default setting, if you only run a small query (compute time is less than one minute), you’ll be billed for 11 minutes of warehouse usage.
Considerations when making changes to auto-suspend
Snowflake administrators might need assistance understanding the ideal auto-suspend time, especially since there may be different optimal auto-suspend times throughout the day or week. This leads to unnecessary costs during periods where a warehouse may be idle.
Factors that might impact auto-suspend time:
- Warehouse Idleness - How long, on average, is your warehouse sitting idle?
- Warehouse Suspension Events - How frequently are idle periods getting resumed or suspended?
Slingshot’s idleness widget shows the general trend of idleness and suspension events across your warehouses over time.
How auto-suspend works in Slingshot
Slingshot now factors in optimal auto-suspend time and provides recommendations based on optimal warehouse size and clusters. Furthermore, Slingshot can identify opportunities to reduce idle time in a warehouse for a given hour or set of hours in the week. In that case, a change in autosuspend will be recommended for that hour in the overarching recommended schedule.
Set auto-suspend to prevent idleness
Are you paying for warehouses that are sitting idle? Scheduling a warehouse with auto-spend times in smaller increments will decrease idleness and save on costs.
Learn more about inefficiencies in cloud data platforms and how to address them in our blog: "Five Data Platform Inefficiencies that Limit Business Value."