Cold Start and Auto-Suspend
Cold start after suspend
Section titled “Cold start after suspend”When the compute pool has not been provisioned yet, or when it has auto-suspended, the next mask() call resumes the Snowflake resources before the request can run.
Typical startup time is about 10-12 minutes:
- Snowflake provisions GPU compute node(s): ~1-3 minutes
- Snowflake pulls the application image and starts the container: ~8 minutes
- Agent Mask starts the service: ~1 minute
Once the pool and service are warm, subsequent calls skip this startup wait. Actual masking time depends on input size, file type, selected language, and query concurrency.
The compute pool uses AUTO_RESUME = TRUE, so the next query starts a suspended pool automatically.
Auto-suspend behavior
Section titled “Auto-suspend behavior”Agent Mask exposes auto-suspend settings for two idle resources:
- Service auto-suspend: stops the service after the service idle timeout.
- Pool auto-suspend: suspends the compute pool after the pool idle timeout and after services are inactive, releasing the GPU node(s).
Default: 300 seconds (5 minutes) for both.
Tune auto-suspend to your usage
Section titled “Tune auto-suspend to your usage”Increase the window to reduce cold-start frequency during intermittent usage. Keep shorter windows for sparse usage where idle GPU cost matters more than avoiding the next startup wait.
-- 30 min auto-suspend for both pool and serviceCALL app_public.set_auto_suspend(1800);
-- Or independentlyCALL app_public.set_auto_suspend(1800, 'pool');CALL app_public.set_auto_suspend(600, 'service');Guideline:
| Usage pattern | Recommended auto-suspend |
|---|---|
| Ad-hoc interactive queries | 300s (default) |
| Business hours only, sporadic | 1800s (30 min) |
| Tight batch windows (e.g., masking ETL every 15 min) | 1200s+ |
| Very sparse, monthly analytics | 300s default |
Cost warning: avoid always-on GPU pools
Section titled “Cost warning: avoid always-on GPU pools”GPU nodes incur Snowflake charges while running, whether they are actively processing or idle. Avoid disabling auto-suspend or keeping min_nodes = 1 continuously unless you have planned for always-on GPU cost.
-- Good: generous timeout; the pool can still suspend during off-hoursCALL app_public.set_auto_suspend(3600);
-- Avoid: continuous GPU charges because the pool never auto-suspends-- DO NOT DO THIS:-- CALL app_public.set_auto_suspend(0);Monitor state
Section titled “Monitor state”Check current state before running a batch to anticipate cold start:
CALL app_public.status();Returns pool and service status. When pool_status is SUSPENDED or STOPPED, plan for startup time before the next mask() call or batch begins.