メインコンテンツまでスキップ

Workload Groups

Use Workload Groups to control how queries share resources within one cluster. For example, create separate groups for scheduled data loads and interactive reporting so that one workload cannot consume all available CPU, memory, or query concurrency.

Workload Groups reserve or cap CPU and memory, limit concurrent queries, queue work, and limit read throughput. They apply only to the selected cluster. They do not isolate data, shared caches, or shared thread pools, and they do not replace warehouse users and roles. Use separate clusters when a workload requires stronger compute isolation.

Before you begin

  • Grant the USAGE privilege on a Workload Group to every warehouse user or role that needs to use it. Assign the group through the user's default Workload Group property or the workload_group session variable. The session variable takes precedence. See Warehouse Users and Roles.
  • You can either create a Workload Group in the VeloDB Cloud console or with SQL. The console provides a guided experience, while SQL allows you to create multiple groups at once and set additional properties.

Create a Workload Group in the console

  1. Log in to the VeloDB Cloud console.

  2. In the upper-left corner, select the warehouse that you want to use.

  3. In the left navigation pane, under Compute, click Workload Groups.

  4. In the upper-right corner, click Add Workload Group.

  5. Configure the resource and queue limits for the workload:

    SettingEffect
    NameA unique name for the workload group.
    ClusterThe cluster that the workload group serves.
    Minimum CPU and Maximum CPUReserve and cap CPU as a percentage of the cluster's available CPU. When CPU is idle, a group can use more than its minimum, but it cannot exceed its maximum.
    Minimum Memory and Maximum MemoryReserve and cap memory as a percentage of the cluster's available memory. Under memory pressure, VeloDB Cloud can cancel queries to make reserved memory available. When a group exceeds its maximum, queries can spill to disk or be canceled.
    Maximum ConcurrencyLimits the number of queries that can run at the same time.
    Maximum Queue SizeControls how many additional queries can wait. A value of 0 rejects queries when the concurrency limit is reached.
    Queue TimeoutSets how long a queued query can wait before it fails.
    Scan Thread CountThe number of threads used for scanning by the current Workload Group. The default value is -1, meaning it is not effective, and the scan thread count in the BE configuration will be used.
  6. Click Confirm.

Choose limits that leave capacity for other Workload Groups and system activity. A maximum limit is not a reservation. A minimum limit reserves capacity when resources are contested. The sum of all minimum CPU values and all minimum memory values must each be no more than 100%, and a minimum value cannot exceed its corresponding maximum value.

Assign a Workload Group

After you grant USAGE, assign the group to the warehouse user or role that runs the workload. You can set the user's default Workload Group or set workload_group for an individual session. The session setting takes precedence. See Warehouse Users and Roles.

Edit or delete a Workload Group

  1. Open Workload Groups.
  2. In the Actions column for the target group, click the edit icon to change its limits, or click the delete icon to remove it.
  3. Confirm the operation.

The default normal Workload Group cannot be deleted. Before deleting another Workload Group, remove or update the privileges, user defaults, session settings, and workload policies that refer to it. Queries already running in the group can be affected when its limits change or the group is deleted.

Manage Workload Groups using SQL

You can manage Workload Groups from the SQL Editor or another SQL client. Specify the cluster with the FOR <cluster> clause. The clause is required for CREATE, ALTER, and DROP WORKLOAD GROUP statements:

CREATE WORKLOAD GROUP reporting FOR analytics
PROPERTIES (
"max_cpu_percent" = "50%",
"max_memory_percent" = "50%",
"max_concurrency" = "20",
"max_queue_size" = "50",
"queue_timeout" = "30000",
"read_bytes_per_second" = "104857600",
"remote_read_bytes_per_second" = "52428800"
);

Replace reporting with the Workload Group name and analytics with the target cluster name. The FOR <cluster_name> clause is required. The read_bytes_per_second property limits reads from internal tables, including spill-file directories. The remote_read_bytes_per_second property limits reads from external tables.

For syntax, supported properties, and inspection commands, see the following docs:

To assign a group with SQL, use one of the following statements after granting USAGE:

SET PROPERTY 'default_workload_group' = 'reporting';
SET workload_group = 'reporting';

The first statement sets reporting as the current SQL user's default Workload Group for future sessions. The second statement applies reporting only to the current session and overrides that default setting.

Next steps