Resource Groups
The Resource Groups feature allows Platform Admins to enable and configure resource allocation mechanisms (resource groups) for the Trino cluster. Once enabled, the system limits concurrency, queue size, memory, and CPU usage for each workload group, preventing any single workload from consuming all cluster resources.
The Resource Groups tab displays Trino's Resource Groups configuration information.
A. Enable Resource Groups
To enable Resource Groups, perform the following steps:
-
Step 1: On the menu bar, select Data Platform > select Workspace Management > select the Workspace name > select Trino
-
Step 2: On the Trino detail page, select the Resource Groups tab
→ The system displays an empty state screen with the Resource Groups icon
- Step 3: Click the Enable button
→ The "Enable resource groups" dialog appears with the Source dropdown (default = File).

- Step 4: From the Source dropdown, select the configuration source type:
- File: Use the local configuration file on the coordinator (no additional information required).
- Database: Use a database to store configurations (requires database connection details).

If Source = Database is selected, fill in the following details:
-
Type: Database type. Currently supported: PostgreSQL.
-
Host: The IP address or hostname of the database server.
-
Port: The connection port (1–65535).
-
Database Name: The database name storing the Resource Groups configuration.
-
Username: The database login username.
-
Password: The database password. Supports show/hide toggle.

Note: If switching from File to Database, the system displays a warning: "Warning: Switching modes involves a 30-90s restart. Active queries will be terminated. Configuration settings will be preserved."
- Step 5: (Optional) Click the Test connection button to verify the database connection before saving.
→ The system confirms a successful connection or displays a specific error message.
- Step 6: Click Save to complete.
→ The dialog closes. The Resource Groups tab changes to the Enabled state. The Details tab is opened by default with the initialized resource group tree (root: global → admin).
B. Manage Resource Groups (Details Tab)

The Details tab consists of two panels:
- Left panel: Displays the resource group tree. Click on a node to view its details.
- Right panel: Displays the details of the selected node, consisting of three sections:
- Concurrency & Queue: Soft concurrency limit, Hard Concurrency Limit, Max Queued.
- Resource limit: Soft cpu limit, Hard cpu limit, Soft Memory Limit.
- Scheduling: Scheduling policy, Scheduling Weight, JMX Export.
B1. Create a New Resource Group
- Step 1: In the left panel, click the + icon next to the "Resource Groups" title.
→ The "Create resource group" dialog opens.

- Step 2: Fill in the required information:
| Field | Description |
|---|---|
| Name (required) | The name of the resource group, up to 250 characters. Supports template variables ${USER}, ${SOURCE}. |
| Max Queued (required) | The maximum number of queries that can be queued. Minimum value: 0. |
| Hard Concurrency Limit (required) | The maximum number of queries running concurrently. Minimum: 1. |
| Soft Concurrency Limit (optional) | Must be ≤ Hard Concurrency Limit if entered. |
| Soft Memory Limit (required) | Percentage format (e.g., 50%) or absolute format (10GB, 500MB). |
| Soft cpu limit / Hard cpu limit (optional) | Hard cpu limit must be greater than Soft cpu limit if both are entered. |
| JMX Export (optional) | Boolean. Default: False. |
| Scheduling policy (optional) | fair / weighted / weighted_fair / query_priority. Default: fair. |
| Scheduling Weight (optional) | Only effective when policy = weighted or weighted_fair. |
- Step 3: Click Create to create.
→ The new node appears in the tree. The Apply change and Cancel buttons appear in the bottom right corner.
B2. Create a Sub-group
-
Step 1: Select the parent node in the resource group tree in the left panel.
-
Step 2: Click the + Add Sub-group button in the right panel.
-
Step 3: Fill in the information and click Create.
→ The child node appears indented below the parent node in the tree.
B3. Edit a Resource Group
-
Step 1: Select the node to edit in the tree.
-
Step 2: Click the Edit button (pencil icon) in the right panel.
→ The "Edit resource group" dialog opens with pre-filled current data.

- Step 3: Update the information and click Save
→ The right panel is updated with the new values. The Apply change and Cancel buttons appear.
B4. Delete a Resource Group
-
Step 1: Select the node to delete in the tree.
-
Step 2: Click the Delete button (trash can icon) in the right panel.

→ A confirmation dialog displays: "Are you sure you want to delete resource group: [name]? This action cannot be undone."
- Step 3: Click Confirm (red button) to confirm the deletion.
→ The node (and all its sub-groups) is deleted from the tree. The Apply change and Cancel buttons appear.
Note: Deleting a parent node will delete all its child sub-groups. This action cannot be undone after clicking Apply change.
B5. Apply Change / Cancel
All changes to the resource group tree are saved temporarily. Click Apply change to apply them to the Trino cluster:
- Apply change: Sends all temporary changes to the Trino coordinator. Completes in ≤ 30 seconds.
- Cancel: Discards all temporary changes, returning the tree to the state of the last applied changes.
C. Manage Selector Rules (Selector Rules Tab)
The Selector Rules tab displays the list of rules for routing queries to resource groups. Rules are processed sequentially — the first matching rule is applied (first match wins). All conditions within a rule use AND logic.
The Selector Rules table consists of the following columns: User match, Source, Query type, Client tags, Target group, Action.
C1. Create a New Selector Rule
- Step 1: Click the + Add selector rule button in the top right corner.
→ The "Create selector rule" dialog opens.

- Step 2: Fill in at least one condition and select the target Resource group:
| Field | Description |
|---|---|
| User | Regex pattern matching the username. Maximum 512 characters. |
| Source | Regex pattern matching the connection source. Maximum 512 characters. |
| Group | The user group name. |
| Query type | Query type — SELECT, INSERT, DELETE, UPDATE, DATA_DEFINITION, etc. |
| Client tags | List of tags. Maximum 20 tags, each up to 128 characters. |
| Resource group | The target group to receive the queries. |
Note: At least one of the condition fields (User, Source, Group, Query type, Client tags) must be filled.
- Step 3: Click Create to save.
→ The rule appears in the table. The Apply change and Cancel buttons appear.
C2. Edit a Selector Rule
- Step 1: Click the pencil (edit) icon in the Action column of the rule you want to edit.
→ The "Edit selector rule" dialog opens with pre-filled current data.

- Step 2: Update the information and click Save.
→ The table is updated with the new information. The Apply change and Cancel buttons appear.
C3. Delete a Selector Rule
- Step 1: Click the trash can (delete) icon in the Action column of the rule you want to delete.

→ A confirmation dialog displays: "Are you sure you want to delete selector rule? This action cannot be undone."
- Step 2: Click Confirm (red button) to delete.
→ The rule disappears from the table. The Apply change and Cancel buttons appear.
D. Configuration Manager (Configuration Tab)
The Configuration tab displays Trino's current Resource Groups configuration source and allows switching between File mode and Database mode.

The page displays two sections:
- Configuration: Shows current configuration mode:
- Type: file/db
- Database url: JDBC URL of the database
- Username: Database username
- Password: Database password (displayed as ***).
- Global properties:
- CPU Quota Period: The time interval (in seconds) over which the CPU quota is enforced.
To change the configuration source, perform the following steps:
- Step 1: Click the Edit button (pencil icon) in the top right corner.
→ The "Enable resource groups" dialog opens with the current Source pre-selected.
- Step 2: Change the Source and fill in the corresponding details (refer to Section A).
Note: Switching modes will trigger a coordinator restart lasting 30–90 seconds. Active queries will be terminated. Resource group and selector rules configurations will be preserved.
- Step 3: Click Save to confirm.
→ The system migrates the configuration. The Configuration tab displays the new source type once complete.
E. Disable Resource Groups
To disable Resource Groups, perform the following steps:
- Step 1: Click the Disable button (red button) in the top right corner — displayed on all three tabs: Details, Selector Rules, and Configuration.

→ A confirmation dialog displays: "This action may lead to unexpected performance degradation or resource contention across workloads. This action cannot be undone."
- Step 2: Click Confirm to confirm.
→ Resource Groups are disabled. The Resource Groups tab returns to the empty state with the Enable button.
Note: Disabling cannot be undone via the UI. To re-enable, click Enable and configure from the beginning.