Warning
SingleStore 9.0 gives you the opportunity to preview, evaluate, and provide feedback on new and upcoming features prior to their general availability. In the interim, SingleStore 8.9 is recommended for production workloads, which can later be upgraded to SingleStore 9.0.
Work with Resource Pool Engine Variables
On this page
This page explains how to set and find current resource pool values.
Set the resource_pool
Value
Set the engine variable resource_
to specify the resource pool to be used by an existing or new client connection.SET resource_
.SET GLOBAL resource_
.resource_
is set to default_
, unless a default resource pool has been set for the user who is connected.
For an example of how resource pools can be used together, consider the following example.executive
and general
, have been created on a cluster
CREATE RESOURCE POOL executive WITH MEMORY_PERCENTAGE = 60;CREATE RESOURCE POOL general WITH MEMORY_PERCENTAGE = 40;
At any point in time, executive
can use at most 60% of query execution memory and general
can use at most 40% of query execution memory.SOFT_
can be set the same way.
The resource_
variable is set to general
so that all new connections are assigned to that pool by default.SUPER
permission.
SET GLOBAL resource_pool = general;
When a new user connects to the cluster, it will be part of the general
resource pool.executive
.
SET resource_pool = executive;
Thus an application controlling client connections would give priority to executive
users by setting their resource_
to executive
after those users connect.general
resource pool from consuming memory that should be kept available for users in the executive
pool.
Find the Current resource_pool
Value
You can determine the current resource pool by querying for the resource_
variable.
SHOW VARIABLES like '%resource_pool%';
+---------------+------------+
| Variable_name | Value |
+---------------+------------+
| resource_pool | test_pool |
+---------------+------------+
SELECT @@resource_pool;
+-----------------+
| @@resource_pool |
+-----------------+
| test_pool |
+-----------------+
To query for the complete list of available resource pools, use the SHOW RESOURCE POOLS
command.
SHOW RESOURCE POOLS;
+--------------+-------------------+---------------+-----------------+---------------------------+
| Pool_Name | Memory_Percentage | Query_Timeout | Max_Concurrency | Soft_CPU_Limit_Percentage |
+--------------+-------------------+---------------+-----------------+---------------------------+
| default_pool | 100 | NULL | NULL | 100 |
| executive | 60 | NULL | NULL | 50 |
| general | 40 | NULL | 40 | 50 |
+--------------+-------------------+---------------+-----------------+---------------------------+
For more information, see the Non-Sync Variables List, and SHOW RESOURCE POOLS.
Last modified: January 25, 2023