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:
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.
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:
Keyword
Description
FIRST
Make this resource group the new first one in the ordering.
LAST
Make 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:
Keyword
Description
tier name
Name of the tier to which limits will be assigned:
The following options can be specified to further modify a resource group
configuration.
Option
Description
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.).
To create a execution_over_memoryresource group, with lower tier
capacity limits, but higher execution options, as compared to the
memory_over_execution group:
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:
Keyword
Description
FIRST
Make this resource group the new first one in the ordering.
LAST
Make 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:
Keyword
Description
tier name
Name of the tier to which limits will be assigned:
The following options can be specified to further modify a resource group
configuration.
Option
Description
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.).
Whether to save this change to the database configuration so that it will stay in effect after a
database restart. Default is true.
Examples
For example, to alter an existing memory_and_executionresource 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:
An existing user-defined resource group can be removed from the system, which
will also dissociate the group from any users or roles to which it was assigned.
DROP RESOURCE GROUP Syntax
1
DROPRESOURCEGROUP<resourcegroupname>
For example, to remove the unlimitedresource group:
DROP RESOURCE GROUP Example
1
DROPRESOURCEGROUPunlimited
SHOW 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
1
SHOWRESOURCEGROUP<<resourcegroupname>|ALL>
For example, to show the configuration of the memory_and_executionresource group:
SHOW RESOURCE GROUP Example
1
SHOWRESOURCEGROUPmemory_and_execution
To show the configuration of all resource groups:
SHOW RESOURCE GROUP (All Groups) Example
1
SHOWRESOURCEGROUPALL
ALTER TIER
The size & eviction thresholds of
storage tiers can be modified, applying the
change to individually specified ranks or all ranks at once.