Skip to content

Cold Start and Auto-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:

  1. Snowflake provisions GPU compute node(s): ~1-3 minutes
  2. Snowflake pulls the application image and starts the container: ~8 minutes
  3. 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.

Agent Mask exposes auto-suspend settings for two idle resources:

  1. Service auto-suspend: stops the service after the service idle timeout.
  2. 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.

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 service
CALL app_public.set_auto_suspend(1800);
-- Or independently
CALL app_public.set_auto_suspend(1800, 'pool');
CALL app_public.set_auto_suspend(600, 'service');

Guideline:

Usage patternRecommended auto-suspend
Ad-hoc interactive queries300s (default)
Business hours only, sporadic1800s (30 min)
Tight batch windows (e.g., masking ETL every 15 min)1200s+
Very sparse, monthly analytics300s default

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-hours
CALL 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);

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.