Managing compute pools

A compute pool is a collection of one or more virtual machine (VM) nodes on which Snowflake runs your Snowpark Container Services jobs and services.

For more information about compute pools, see Snowpark Container Services: Working with compute pools.

This topic shows how to do the following tasks with services:

For common operations, such as listing or dropping, Snowflake CLI uses snow object commands as described in Managing Snowflake objects.

How to create a compute pool

To create a compute pool named “pool_1” composed of two CPUs with 4 GB of memory, enter a spcs pool create command similar to the following:

snow spcs compute-pool create "pool_1" --min-nodes 2 --max-nodes 2 --family "CPU_X64_XS"
Copy

For more information about instance families, see the SQL CREATE COMPUTE POOL command.

How to suspend and resume a compute pool

Note

The current role must have OPERATE privilege on the compute pool to suspend or resume it.

To suspend a compute pool, enter a command similar to the following:

snow spcs compute-pool suspend tutorial_compute_pool
Copy
+-------------------------------------------+
| key    | value                            |
|--------+----------------------------------|
| status | Statement executed successfully. |
+-------------------------------------------+

To resume a suspended compute pool, enter a command similar to the following:

snow spcs compute-pool resume tutorial_compute_pool
Copy
+-------------------------------------------+
| key    | value                            |
|--------+----------------------------------|
| status | Statement executed successfully. |
+-------------------------------------------+

How to set and unset a compute pool’s properties or parameters

Note

The current role must have MODIFY privilege on the compute pool to set properties.

To set a property or parameter, enter a command similar to the following:

snow spcs compute-pool set tutorial_compute_pool --min-nodes 2 --max-nodes 4
Copy
+-------------------------------------------+
| key    | value                            |
|--------+----------------------------------|
| status | Statement executed successfully. |
+-------------------------------------------+

To reset a property or parameter to its default value, enter a command similar to the following:

snow spcs compute-pool unset tutorial_compute_pool --auto-resume
Copy
+-------------------------------------------+
| key    | value                            |
|--------+----------------------------------|
| status | Statement executed successfully. |
+-------------------------------------------+

How to stop all services in a compute pool

Stopping a compute pool deletes all of the services running on the compute pool; however, it does not stop the compute pool itself.

To stop a compute pool, enter a spcs compute-pool stop-all command similar to the following:

snow spcs compute-pool stop-all "pool_1"
Copy