Cost and credit usage¶
This topic describes how Snowflake bills compute used by Snowflake App Runtime and where to track that usage.
How App Runtime compute is billed¶
Snowflake App Runtime usage appears in METERING_HISTORY and METERING_DAILY_HISTORY under these service types:
| Service type | Description |
|---|---|
SNOWFLAKE_APP_RUNTIME | Compute used to build and host Snowflake App Runtime services on managed compute. |
SNOWFLAKE_APP_RUNTIME_SERVERLESS | Compute used to run Snowflake App Runtime services on serverless compute (compute_resource: SERVERLESS). |
SNOWFLAKE_APP_RUNTIME_PREVIEW | Compute used to preview Snowflake App Runtime apps in Snowsight Workspaces. |
How credits are attributed depends on the app’s compute resource:
- Managed compute. All apps in an account share
Snowflake-managed compute. Snowflake bills credit usage at the account level
under the
SNOWFLAKE_APP_RUNTIMEservice type, separate from your warehouses and other compute. You can’t see credits for individual apps. - Serverless compute. Snowflake reports credits for each Application
Service under the
SNOWFLAKE_APP_RUNTIME_SERVERLESSservice type, so you can see what each app costs. See Find credit usage for each app. - Workspaces preview. Snowflake reports credits for the user who ran
the preview under the
SNOWFLAKE_APP_RUNTIME_PREVIEWservice type. See Find credit usage for Workspaces preview.
Credit rate¶
Managed compute credits are charged per compute-hour at the rate listed in the
Snowflake Service Consumption Table
under “Serverless Feature Credit Table” for the SNOWFLAKE_APP_RUNTIME service
type. Managed compute uses CPU_X64_S nodes (3 vCPU, 13 GiB RAM).
This rate reflects a discount relative to the equivalent self-managed SPCS
compute pool node rate.
You aren’t billed per request or per concurrent user. Cost depends on how long the underlying compute nodes run, regardless of whether your app is handling traffic.
You pay for nodes, not instances. App Runtime packs multiple instances onto a node when resource requests allow it, so a new node is added only when existing ones are full.
Billing lifecycle¶
On managed compute, App Runtime billing follows the same lifecycle as SPCS compute pools. For details on how costs accrue in each state (ACTIVE, IDLE, SUSPENDED), see Compute pool cost.
Apps left running while idle still accrue credits. To stop an app you don’t need, see Start, stop, and scale a Snowflake App Runtime app.
On serverless compute, an app accrues credits only while it runs. Snowflake
starts the app on the first request and stops it after the idle period set by
auto_suspend_secs, so an app with no traffic doesn’t consume compute.
Find App Runtime usage in metering views¶
App Runtime credits appear in the same metering views that report other Snowflake compute usage:
- METERING_HISTORY: hourly credit usage for the last 365 days.
- METERING_DAILY_HISTORY: daily credit usage rolled up by service type.
For cross-account roll-ups, use organization-level metering views such as USAGE_IN_CURRENCY_DAILY.
The following query returns hourly App Runtime credit usage for the last 30
days. Filter service_type to one value to see a single compute type:
Find credit usage for each app¶
Snowflake reports managed compute credits at the account level, so you can’t break them down by app. Apps on serverless compute (Public Preview) report credits for each app.
In METERING_HISTORY, each
serverless row has SERVICE_TYPE set to SNOWFLAKE_APP_RUNTIME_SERVERLESS,
ENTITY_TYPE set to APPLICATION SERVICE, and ENTITY_ID set to the
service’s unique ID. DATABASE_NAME, SCHEMA_NAME, and NAME identify the
Application Service.
You can also query SNOWFLAKE_APP_RUNTIME_COMPUTE_HISTORY for hourly serverless credits for each app:
In METERING_HISTORY, group by ENTITY_ID rather than by name. A service that you drop and recreate
under the same name gets a new ID, so it counts as a separate app.
To total credits for each app:
To see daily credit usage for one app over the last 30 days:
Per-app credits cover serverless compute only. Usage on the managed compute pool isn’t broken down by app, so per-app totals don’t add up to the account’s total App Runtime usage when you use both compute resources.
To query METERING_HISTORY, your role needs access to the SNOWFLAKE.ACCOUNT_USAGE
schema, for example through the USAGE_VIEWER database role or IMPORTED PRIVILEGES
on the SNOWFLAKE database. See Account Usage.
Usage can take up to three hours to appear in Account Usage views.
Find credit usage for Workspaces preview¶
When you preview an app in a Snowsight workspace, usage appears in metering
views with the service type SNOWFLAKE_APP_RUNTIME_PREVIEW. Each row is
attributed to the user who ran the preview, not to an Application Service. See
Develop Snowflake App Runtime apps in Snowsight Workspaces.
To see hourly preview credit usage for the last 30 days:
To total preview credits for each user, query
SNOWFLAKE_APP_RUNTIME_COMPUTE_HISTORY
where compute_type is PREVIEW:
To stop a preview before it suspends on its own, select Shutdown from the Preview pane’s menu. Closing the pane leaves the dev server running until it goes idle.
Inspect App Runtime credit usage¶
For a focused view of App Runtime credit usage, query
SNOWFLAKE_APP_RUNTIME_COMPUTE_HISTORY.
The view returns hourly credit usage for each compute type over the last 365
days. Use compute_type to tell the rows apart:
MANAGED COMPUTE POOL: one row per account per hour.SERVERLESS: one row per Application Service per hour.PREVIEW: one row per user per hour for Workspaces previews.
Reduce App Runtime cost¶
On managed compute, an app runs until you suspend or drop it, so a deployed app that nobody uses still consumes compute. To control cost:
- Migrate to serverless compute for apps with intermittent traffic. Serverless apps stop when idle and report credits for each app. See Move an existing app to serverless compute.
- Drop unused apps. Use
DROP APPLICATION SERVICEto permanently remove apps you no longer need. - Monitor app state. Use Monitor a Snowflake App Runtime app to find apps stuck in unexpected states that may still be consuming compute.
Next steps¶
- Set how long a serverless app stays idle before it stops: Set the idle timeout.
- Query hourly App Runtime credit usage: SNOWFLAKE_APP_RUNTIME_COMPUTE_HISTORY view.
