Snowpark-optimized warehouses

This topic explains how to create and use Snowpark-optimized warehouses which provide 16x memory per node compared to a standard Snowflake virtual warehouse.

When to use a Snowpark-optimized warehouse

Snowpark workloads can be run on both Standard and Snowpark-optimized warehouses. Snowpark-optimized warehouses are recommended for workloads that have large memory requirements such as ML training use cases using a stored procedure on a single virtual warehouse node. Initial creation and resumption of a Snowpark-optimized virtual warehouse may take longer than standard warehouses. Additionally, Snowpark workloads, utilizing UDF or UDTF, may also benefit from Snowpark-optimized warehouses.

Creating a Snowpark-optimized warehouse

Use the warehouse_type property in the CREATE WAREHOUSE command to create a new Snowpark-optimized warehouse.

Create a new Snowpark-optimized warehouse snowpark_opt_wh:

CREATE OR REPLACE WAREHOUSE snowpark_opt_wh WITH
  WAREHOUSE_SIZE = 'MEDIUM'
  WAREHOUSE_TYPE = 'SNOWPARK-OPTIMIZED';
Copy

Tip

To maximize CPU and memory resources when running Snowpark UDFs or stored procedures, set the MAX_CONCURRENCY_LEVEL parameter for your warehouse when using the CREATE WAREHOUSE or ALTER WAREHOUSE command. For example:

alter warehouse snowpark_opt_wh set max_concurrency_level = 1;
Copy

To verify the compute resources for your warehouse have been fully provisioned, use SHOW WAREHOUSES to check its state.

Modifying Snowpark-optimized warehouse properties

The ALTER WAREHOUSE command can be used to modify warehouse properties, including the warehouse type.

Note

Changing the warehouse type using the ALTER WAREHOUSE command is only supported for a warehouse in the SUSPENDED state. To suspend a warehouse before changing the warehouse_type property, execute the following statement:

ALTER WAREHOUSE snowpark_opt_wh SUSPEND;
Copy

Using Snowpark Python Stored Procedures to run ML training workloads

For information on Machine Learning Models and Snowpark Python, see Training Machine Learning Models with Snowpark Python.

Billing for Snowpark-optimized warehouses

The following table shows the Snowflake credits charged per hour for a Snowpark-optimized virtual warehouse by warehouse size. Snowpark-optimized warehouses are not supported on X-SMALL or SMALL warehouse sizes.

For more details on virtual warehouse credit usage, see Virtual warehouse credit usage.

X-Small

Small

Medium

Large

X-Large

2X-Large

3X-Large

4X-Large

5X-Large

6X-Large

Credits/hour

n/a

n/a

6

12

24

48

96

192

384

768

Region availability

Snowpark-optimized warehouses are available in all regions across AWS, Azure, and Google Cloud.