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¶
warehouse_type property in the CREATE WAREHOUSE command to create a new Snowpark-optimized warehouse.
Create a new Snowpark-optimized warehouse
CREATE OR REPLACE WAREHOUSE snowpark_opt_wh WITH
WAREHOUSE_SIZE = 'MEDIUM'
WAREHOUSE_TYPE = 'SNOWPARK-OPTIMIZED';
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;
To verify the compute resources for your warehouse have been fully provisioned, use SHOW WAREHOUSES
to check its
Modifying Snowpark-optimized Warehouse Properties¶
The ALTER WAREHOUSE command can be used to modify warehouse properties, including the warehouse type.
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
ALTER WAREHOUSE snowpark_opt_wh SUSPEND;
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
SMALL warehouse sizes.
For more details on virtual warehouse credit usage, see Virtual warehouse credit usage.
Snowpark-optimized warehouses are available in all regions across AWS, Azure, and Google Cloud.