Skip to Content
CypherCommandsAdminResource Management

Resource Management

Resource management in Flavius allows administrators to control and allocate system resources effectively. This document covers the key concepts and commands related to resource management.

ResourceGroup

ℹ️

NOTE: Currently, flavius has two buildin resource groups: query_resource_group and import_resource_group, where regular queries are submitted to query_resource_group and importing load jobs and backgroud compaction tasks are submitted to import_resource_group.

Currently we have the following configurations for resource groups.

KeyDescriptionValue TypeDefault Value
memory_limit_bytesMemory limit of this resource group for each flavius compute nodeInteger
cpu_core_limitFor each flavius compute, how many cpu cores are allocated for this resource group’s compute threadsInteger
io_core_limitFor each flavius compute, how many cpu cores are allocated for this resource group’s io threadsInteger
concurrency_limitLimit the number of concurrent running queries/jobs on this resource groupInteger

If query queue enabled, the fowlloing configurations are used for manage the behavior of query queue.

KeyDescriptionValue TypeDefault Value
query_queue_enabledIf query queuing is enabledBooleanFalse
query_queue_timeout_secondHow long the query stay in the queue before timeout by the queue. 0 means unlimited.Integer0
query_queue_concurrency_limitIf current running queries exceed this limit, new queries are pushed to the queue. 0 means unlimited.Integer0
query_queue_memory_percent_limitIf current flavius compute nodes memory useage exceed this limit, new queries will be pushed to the queue. 0 means unlimited. Max value 100.Integer0
query_queue_cpu_used_permille_limitIf current flavius compute node cpu usage exceed this limit, new queries will be pushed to the queue. cpu_usec_permille = folly::ThreadPool::usedCpuTime() / 1000000 / NUM_THREAD. 0 means unlimited. Max value 1000.Integer0
query_queue_thread_pool_pending_task_count_limitIf current flavius compute node thread pool pending task count exceed this limit, new queries will be pushed to the queue. 0 means unlimitedInteger0

List Resource Group

LIST RESOURCE GROUP

Describe Resource Group

DESCRIBE RESOURCE GROUP <group_name>

NOTE: resource group names are case sensitive.

Example Show the configurations of Query Resource group.

DESCRIBE RESOURCE GROUP Query

Alter Resource Group

Update the resource group configurations.

ALTER RESOURCE GROUP <group_name> WITH ( <key> = <val>, <key> = <val>, ... )

Example Update enable query queuing and update query queue concurreny limit

ALTER RESOURCE GROUP Query WITH ( query_queue_enabled = true, query_queue_concurrency_limit = 100, )
Last updated on