Skip to main content
Kinetica provides a SQL interface for managing resource groups, which can be used to limit memory and thread usage, and execution priority for a user or group of users. It also provides the means to modify the tiers that the resource groups reference. The ability to manage resource groups is available through SQL, using the following commands: The ability to manage tiers is available through the following command: See Security for details on assigning resource groups to users and roles.

CREATE RESOURCE GROUP

Resource groups require only a name to be created, all limits are optional. Resource group names are case-sensitive and must contain only letters, digits, and underscores, and cannot begin with a digit. A resource group must also not be named the same as an existing resource group, including the default resource groups: kinetica_system_resource_group & kinetica_default_resource_group.
CREATE RESOURCE GROUP Syntax
CREATE RESOURCE GROUP <resource group name>
[ RANK <FIRST | LAST | BEFORE <group name> | AFTER <group name>> ]
[
    TIER LIMITS
    (
        <tier name> USING (<tier property name> = <tier property value>[,...]),
        ...
        <tier name> USING (<tier property name> = <tier property value>[,...])
    )
]
[ WITH OPTIONS (<resource property name> = <resource property value>[,...]) ]

Parameters

<resource group name>

Name of the resource group to create.

RANK

Designation of where in the ordering of applicable resource groups this one should exist. For a given set of resource groups, the one that is ranked before all the others will be used.RANK designations include:
KeywordDescription
FIRSTMake this resource group the new first one in the ordering.
LASTMake this resource group the new last one in the ordering.
BEFORE <group name>Place this resource group before the one specified by group name in the ordering.
AFTER <group name>Place this resource group after the one specified by group name in the ordering.

TIER LIMITS

Optional indicator that a set of tier names and corresponding property assignments will follow.Parameters for each tier assignment are as follows:
KeywordDescription
tier nameName of the tier to which limits will be assigned:
Name Description
VRAM Configure the VRAM tier.
RAM Configure the RAM tier.
tier property nameName of the tier property to which a limit will be assigned:
Property Description
max_memory Maximum amount of memory per rank per GPU that can be used in the VRAM tier, or maximum amount of memory per rank that can be used in the RAM tier.
tier property valueValue to assign the corresponding tier property.

WITH OPTIONS

Optional indicator that a comma-delimited list of resource group property option/value assignments will follow.See Options for the complete list of options.

Options

The following options can be specified to further modify a resource group configuration.

max_cpu_concurrency

Maximum number of simultaneous threads that will be used to execute a request, per rank. Must be >= 4.

max_data

Maximum amount of data, per rank, in bytes, that can be used by all database objects within this group; for example, a max_data of 1000000000 would limit a user with this resource group to a per-rank total of 1GB of data usage across all tables, views, graphs, etc., including temporary objects supporting data processing operations (queries, materialized views, etc.).

max_scheduling_priority

Maximum scheduling priority of a task.

max_tier_priority

Maximum eviction priority of a tiered object.

Examples

To create a simple unlimited resource group with default settings:
CREATE RESOURCE GROUP Example
CREATE RESOURCE GROUP unlimited
To create a memory_over_execution resource group, with high tier capacity limits, but low execution options:
CREATE RESOURCE GROUP with Tier Limits & Options Example
CREATE RESOURCE GROUP memory_over_execution
TIER LIMITS
(
    VRAM USING (max_memory = 10737418240),
    RAM USING (max_memory = 107374182400)
)
WITH OPTIONS
(
    max_cpu_concurrency = 5,
    max_scheduling_priority = 30,
    max_tier_priority = 4
)
To create a execution_over_memory resource group, with lower tier capacity limits, but higher execution options, as compared to the memory_over_execution group:
CREATE RESOURCE GROUP with Ranking Example
CREATE RESOURCE GROUP execution_over_memory
RANK BEFORE memory_over_execution
TIER LIMITS
(
    VRAM USING (max_memory = 1073741824),
    RAM USING (max_memory = 10737418240)
)
WITH OPTIONS
(
    max_cpu_concurrency = 7,
    max_scheduling_priority = 70,
    max_tier_priority = 10
)

ALTER RESOURCE GROUP

Any of the following facets of a resource group can be altered, either individually or as a group:
  • Rank
  • Tier limits
  • Execution options
ALTER RESOURCE GROUP Syntax
ALTER RESOURCE GROUP <resource group name>
[ RANK <FIRST | LAST | BEFORE <group name> | AFTER <group name>> ]
[
    TIER LIMITS
    (
        <tier name> USING (<tier property name> = <tier property value>[,...]),
        ...
        <tier name> USING (<tier property name> = <tier property value>[,...])
    )
]
[ WITH OPTIONS (<resource property name> = <resource property value>[,...]) ]

Parameters

<resource group name>

Name of the resource group to alter.

RANK

Designation of where in the ordering of applicable resource groups this one should exist. For a given set of resource groups, the one that is ranked before all the others will be used.RANK designations include:
KeywordDescription
FIRSTMake this resource group the new first one in the ordering.
LASTMake this resource group the new last one in the ordering.
BEFORE <group name>Place this resource group before the one specified by group name in the ordering.
AFTER <group name>Place this resource group after the one specified by group name in the ordering.

TIER LIMITS

Optional indicator that a set of tier names and corresponding property assignments will follow.Parameters for each tier assignment are as follows:
KeywordDescription
tier nameName of the tier to which limits will be assigned:
Name Description
VRAM Update the VRAM tier.
RAM Update the RAM tier.
tier property nameName of the tier property to which a limit will be assigned:
Property Description
max_memory Maximum amount of memory per rank per GPU that can be used in the VRAM tier, or maximum amount of memory per rank that can be used in the RAM tier.
tier property valueValue to assign the corresponding tier property.

WITH OPTIONS

Optional indicator that a comma-delimited list of resource group property option/value assignments will follow.See Options for the complete list of options.

Options

The following options can be specified to further modify a resource group configuration.

max_cpu_concurrency

Maximum number of simultaneous threads that will be used to execute a request, per rank. Must be >= 4.

max_data

Maximum amount of data, per rank, in bytes, that can be used by all database objects within this group; for example, a max_data of 1000000000 would limit a user with this resource group to a per-rank total of 1GB of data usage across all tables, views, graphs, etc., including temporary objects supporting data processing operations (queries, materialized views, etc.).

max_scheduling_priority

Maximum scheduling priority of a task.

max_tier_priority

Maximum eviction priority of a tiered object.

persist

Whether to save this change to the database configuration so that it will stay in effect after a database restart. Default is true.

Examples

To alter an existing memory_and_execution resource group, moving it to the highest ranking, while assigning new limits for the RAM tier and max_cpu_concurrency & max_scheduling_priority options, but leaving other existing settings untouched:
ALTER RESOURCE GROUP Example
ALTER RESOURCE GROUP memory_and_execution
RANK FIRST
TIER LIMITS
(
    RAM USING (max_memory = 214748364800)
)
WITH OPTIONS
(
    max_cpu_concurrency = 9,
    max_scheduling_priority = 90
)

DROP RESOURCE GROUP

An existing user-defined resource group can be removed from the system, provided there are no users or roles currently assigned to it and there are no tables or graphs contained within it.
DROP RESOURCE GROUP Syntax
DROP RESOURCE GROUP <resource group name>

Examples

To remove the unlimited resource group:
DROP RESOURCE GROUP Example
DROP RESOURCE GROUP unlimited

SHOW RESOURCE GROUP

The DDL statement required to reconstruct any resource group can be shown. The DDL for all resource groups in the system can also be shown with a single command.
SHOW RESOURCE GROUP Syntax
SHOW RESOURCE GROUP < <resource group name> | ALL >

Examples

To show the DDL of the memory_and_execution resource group:
SHOW RESOURCE GROUP Example
SHOW RESOURCE GROUP memory_and_execution
To show the DDL of all resource groups:
SHOW RESOURCE GROUP (All Groups) Example
SHOW RESOURCE GROUP ALL

DESCRIBE RESOURCE GROUP

The configuration of any resource group can be shown, in tabular form. The configuration for all resource groups in the system can also be shown with a single command.
SHOW RESOURCE GROUP Syntax
SHOW RESOURCE GROUP < <resource group name> | ALL >

Examples

To show the configuration of the memory_and_execution resource group:
DESCRIBE RESOURCE GROUP Example
DESCRIBE RESOURCE GROUP memory_and_execution
To show the configuration of all resource groups:
DESCRIBE RESOURCE GROUP (All Groups) Example
DESCRIBE RESOURCE GROUP ALL

ALTER TIER

The size & eviction thresholds of storage tiers can be modified, applying the change to individually specified ranks or all ranks at once. Tier settings can be viewed with SHOW SYSTEM PROPERTIES.
ALTER TIER Syntax
ALTER TIER <tier name>
WITH OPTIONS (<tier property name> = <tier property value>[,...])

Parameters

<tier name>

Name of the storage tier to alter.
NameDescription
VRAMAlter the VRAM tier.
RAMAlter the RAM tier.
DISK[n]Alter the specified disk tier.
PERSISTAlter the persist tier.
COLD[n]Alter the specified cold storage tier.

WITH OPTIONS

Optional indicator that a comma-delimited list of tier property name / tier property value assignments will follow.
PropertyDescription
capacitySize, in bytes, of a rank in this tier; for RAM, disk, & persist tiers.
high_watermarkHigh watermark eviction threshold for a rank in this tier; for VRAM, RAM, disk, & persist tiers.
low_watermarkLow watermark eviction threshold for a rank in this tier; for VRAM, RAM, disk, & persist tiers.
wait_timeoutTimeout, in seconds, for reading from or writing to this tier; for cold storage tiers.
persistWhether to save this change to the database configuration so that it will stay in effect after a database restart; default is true.
rankSpecific rank in this tier to apply the change to; default is to apply the change to all ranks in the tier.

Examples

To alter the capacity of the RAM tier on rank 0 to 500MB temporarily (until the database is restarted):
ALTER TIER Capacity on a Rank Temporarily Example
ALTER TIER ram
WITH OPTIONS
(
	'capacity' = '500000000',
	'rank' = 0,
	'persist' = false
)
To show the change took effect:
SHOW Tier Capacity on a Rank Example
SHOW SYSTEM PROPERTIES
WITH OPTIONS ('properties' = 'conf.tier.ram.rank0.limit')
Tier Capacity on a Rank Output
+-----------------------------------------+
| SYSTEM_PROPERTIES                       |
+-----------------------------------------+
| conf.tier.ram.rank0.limit = 500000000   |
+-----------------------------------------+
To alter the eviction thresholds of the VRAM tier across all ranks, and save the change to the startup configuration:
ALTER TIER Eviction Thresholds Permanently Example
ALTER TIER vram
WITH OPTIONS
(
	'high_watermark' = '95',
	'low_watermark' = '75'
)
To show the change took effect:
SHOW Tier Eviction Thresholds Example
SHOW SYSTEM PROPERTIES
WITH OPTIONS
(
    'properties' =
    '
        conf.tier.vram.default.all_gpus.high_watermark,
        conf.tier.vram.default.all_gpus.low_watermark,
        conf.tier.vram.rank0.all_gpus.high_watermark,
        conf.tier.vram.rank0.all_gpus.low_watermark,
        conf.tier.vram.rank1.all_gpus.high_watermark,
        conf.tier.vram.rank1.all_gpus.low_watermark,
        conf.tier.vram.rank2.all_gpus.high_watermark,
        conf.tier.vram.rank2.all_gpus.low_watermark
    '
)
Tier Eviction Thresholds Output
+-------------------------------------------------------+
| SYSTEM_PROPERTIES                                     |
+-------------------------------------------------------+
| conf.tier.vram.default.all_gpus.high_watermark = 95   |
| conf.tier.vram.default.all_gpus.low_watermark = 75    |
| conf.tier.vram.rank0.all_gpus.high_watermark = 90     |
| conf.tier.vram.rank0.all_gpus.low_watermark = 80      |
| conf.tier.vram.rank1.all_gpus.high_watermark = 95     |
| conf.tier.vram.rank1.all_gpus.low_watermark = 75      |
| conf.tier.vram.rank2.all_gpus.high_watermark = 95     |
| conf.tier.vram.rank2.all_gpus.low_watermark = 75      |
+-------------------------------------------------------+