Snowflake Gen AI Governance · Topic 11 of 15
Tracking Snowpark Container Services Costs and Compute Pools
Track Snowpark Container Services spend: compute pool billing states, auto suspend, SNOWPARK_CONTAINER_SERVICES_HISTORY, storage and data transfer.
- 4 min
- Cost drivers: compute pool (nodes and instance family), storage, data transfer.
- Not billed in STARTING or SUSPENDED; billed in ACTIVE, IDLE, STOPPING, RESIZING.
AUTO_SUSPEND_SECSreduces idle spend.
What it is
Snowpark Container Services (SPCS) runs containers inside Snowflake. In Gen AI work you meet it when you host a custom model, a vector database, a custom app or a model served from the Snowflake Model Registry. Unlike Cortex functions, SPCS is not billed by tokens. It is billed by compute pool time.
SPCS cost has three categories: compute pool, storage and data transfer. The compute pool is the main driver.
How it works
Compute pools
A compute pool is a set of virtual machine nodes. Billing depends on the number of nodes and the instance family (the machine type) of the nodes in the pool.
| Pool state | Billed? |
|---|---|
| STARTING | No |
| ACTIVE | Yes |
| IDLE | Yes |
| STOPPING | Yes |
| RESIZING | Yes |
| SUSPENDED | No |
The important point is that IDLE is billed. A pool with no running service still costs while it is idle. To avoid that, use the auto-suspend setting (AUTO_SUSPEND_SECS, default 3600) in CREATE COMPUTE POOL so an idle pool suspends, or suspend it by hand.
CREATE COMPUTE POOL genai_pool
MIN_NODES = 1
MAX_NODES = 2
INSTANCE_FAMILY = GPU_NV_S
AUTO_SUSPEND_SECS = 300;
ALTER COMPUTE POOL genai_pool SUSPEND;
GPU_NV_S is only an example; SHOW COMPUTE POOL INSTANCE FAMILIES lists what your region offers. Choose the family for the workload: GPU families for model inference, CPU families for app logic. A bigger family or more nodes costs more per hour.
Usage views
| View | Use |
|---|---|
SNOWFLAKE.ACCOUNT_USAGE.SNOWPARK_CONTAINER_SERVICES_HISTORY | Hourly credit consumption for SPCS only |
SNOWFLAKE.ACCOUNT_USAGE.METERING_HISTORY | Hourly credits; filter service_type = 'SNOWPARK_CONTAINER_SERVICES' |
SNOWFLAKE.ACCOUNT_USAGE.METERING_DAILY_HISTORY | Daily; same service type filter |
SNOWFLAKE.ORGANIZATION_USAGE.METERING_DAILY_HISTORY | Daily across the organization, same filter |
SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.METERING_HISTORY
WHERE service_type = 'SNOWPARK_CONTAINER_SERVICES';
SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.SNOWPARK_CONTAINER_SERVICES_HISTORY;
Storage costs
Standard Snowflake storage rates apply:
- The image repository is built on a stage, so its images are billed as stage storage.
- Logs in event tables incur event table storage.
- A stage mounted as a volume incurs stage costs. Node-local storage adds no charge beyond the node.
- Block storage and snapshot storage are billed separately.
Data transfer
Outbound transfer from services to other regions or the internet is billed at standard egress rates. Query DATA_TRANSFER_HISTORY with transfer_type = 'SNOWPARK_CONTAINER_SERVICES'. Transfer between compute entities, for example a compute pool and a warehouse, appears as transfer_type = 'INTERNAL', and the INTERNAL_DATA_TRANSFER_HISTORY view exists in ACCOUNT_USAGE. Data transfer is not currently billed for accounts on Google Cloud.
Where SPCS meets Cortex
AI_COMPLETE can use a model deployed as an SPCS inference service (bring your own model, in open preview). Those calls are served by your compute pool, so pool time is a cost driver, and access control follows separate requirements.
A question about a surprise bill on a Gen AI app hosted in SPCS usually has the answer "the compute pool stayed ACTIVE or IDLE; set AUTO_SUSPEND_SECS or suspend it".
A worked cost review
Suppose a team hosts an embedding model in SPCS and the bill is higher than expected. Work through the three categories in order of likely impact.
- Compute pool. Query
SNOWPARK_CONTAINER_SERVICES_HISTORYby hour. If credits are flat around the clock, the pool is probably never suspending, or a service is running when nobody calls it. - Storage. Check whether old images pile up in the image repository, and whether logs in the event table grow without a retention plan.
- Data transfer. Check
DATA_TRANSFER_HISTORYfor the SPCS transfer type, in case results leave the region or go to the internet.
The fix is nearly always on the pool: right-size the instance family, lower MAX_NODES, and enable auto-suspend. Because STARTING is not billed but a restart takes time, auto-suspend suits batch and development pools better than latency-sensitive production pools, where you may accept a small idle cost for fast responses.
Organization level view
An organization with many accounts can use SNOWFLAKE.ORGANIZATION_USAGE.METERING_DAILY_HISTORY with the same service type filter. This answers a finance question such as "what does SPCS cost across all our accounts", which a single account's ACCOUNT_USAGE view cannot.
Common mistakes
Thinking an idle pool is free. IDLE is billed; only STARTING and SUSPENDED are not.
Looking for token charges. SPCS bills compute pools, not tokens.
Forgetting storage and egress. Image repository, event table logs and egress add up.
Using only the AI_SERVICES service type. SPCS has its own type, SNOWPARK_CONTAINER_SERVICES.
What to remember for the exam
- Cost drivers: compute pool (nodes and instance family), storage, data transfer.
- Not billed in STARTING or SUSPENDED; billed in ACTIVE, IDLE, STOPPING, RESIZING.
AUTO_SUSPEND_SECSreduces idle spend.- Views: SNOWPARK_CONTAINER_SERVICES_HISTORY, and METERING views with the service type filter.
Check yourself
Which pool states are not billed?
STARTING and SUSPENDED.
How do you stop paying for an idle compute pool?
Set AUTO_SUSPEND_SECS in CREATE COMPUTE POOL, or suspend the pool.
Which view gives hourly SPCS-only credits?
SNOWFLAKE.ACCOUNT_USAGE.SNOWPARK_CONTAINER_SERVICES_HISTORY.
Topic 11 of 15 in Snowflake Gen AI Governance
Test yourself on Snowflake Gen AI Governance
The full Snowflake GES-C02 question bank has 585 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.