> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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**.

```sql title="CREATE RESOURCE GROUP Syntax" theme={null}
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

> [accordion] \<resource group name>
>
> Name of the [resource group](https://docs.kinetica.com/content/rm/concepts.md#rm-concepts-resource-groups) to create.

> [accordion] 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:
>
> <table>
>   <thead>
>     <tr>
>       <th>Keyword</th>
>       <th>Description</th>
>     </tr>
>   </thead>
>
>   <tbody>
>     <tr>
>       <td>`FIRST`</td>
>       <td>Make this *resource group* the new first one in the ordering.</td>
>     </tr>
>
>     <tr>
>       <td>`LAST`</td>
>       <td>Make this *resource group* the new last one in the ordering.</td>
>     </tr>
>
>     <tr>
>       <td>`BEFORE <group name>`</td>
>       <td>Place this *resource group* before the one specified by `group name` in the ordering.</td>
>     </tr>
>
>     <tr>
>       <td>`AFTER <group name>`</td>
>       <td>Place this *resource group* after the one specified by `group name` in the ordering.</td>
>     </tr>
>   </tbody>
> </table>

> [accordion] TIER LIMITS
>
> Optional indicator that a set of [tier](https://docs.kinetica.com/content/rm/concepts.md#rm-concepts-tiers) names and corresponding
> property assignments will follow.
>
> Parameters for each *tier* assignment are as follows:
>
> <table>
>   <thead>
>     <tr>
>       <th>Keyword</th>
>       <th>Description</th>
>     </tr>
>   </thead>
>
>   <tbody>
>     <tr>
>       <td>`tier name`</td>
>       <td>Name of the *tier* to which limits will be assigned: <table>  <thead>  <tr>    <th>Name</th>    <th>Description</th>  </tr>  </thead>  <tbody>  <tr>    <td>`VRAM`</td>    <td>Configure the [VRAM tier](https://docs.kinetica.com/content/rm/concepts.md#rm-concepts-tiers-vram).</td>  </tr>  <tr>    <td>`RAM`</td>    <td>Configure the [RAM tier](https://docs.kinetica.com/content/rm/concepts.md#rm-concepts-tiers-ram).</td>  </tr>  </tbody></table></td>
>     </tr>
>
>     <tr>
>       <td>`tier property name`</td>
>       <td>Name of the *tier* property to which a limit will be assigned: <table>  <thead>  <tr>    <th>Property</th>    <th>Description</th>  </tr>  </thead>  <tbody>  <tr>    <td>`max_memory`</td>    <td>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*.</td>  </tr>  </tbody></table></td>
>     </tr>
>
>     <tr>
>       <td>`tier property value`</td>
>       <td>Value to assign the corresponding *tier* property.</td>
>     </tr>
>   </tbody>
> </table>

> [accordion] WITH OPTIONS
>
> Optional indicator that a comma-delimited list of *resource group* property option/value
> assignments will follow.
>
> See [Options](https://docs.kinetica.com/content/sql/resource_group/create-resource-group.md#sql-rg-create-opt) for the complete list of options.

## Options

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

> [accordion] max\_cpu\_concurrency
>
> Maximum number of simultaneous threads that will be used to execute a request, per rank.
> Must be >= *4*.

> [accordion] 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.).

> [accordion] max\_scheduling\_priority
>
> Maximum [scheduling priority](https://docs.kinetica.com/content/rm/concepts.md#rm-concepts-scheduling-priority) of a task.

> [accordion] max\_tier\_priority
>
> Maximum [eviction priority](https://docs.kinetica.com/content/rm/concepts.md#rm-concepts-eviction-priority) of a tiered object.

## Examples

To create a simple **unlimited** *resource group* with default settings:

```sql CREATE RESOURCE GROUP Example theme={null}
CREATE RESOURCE GROUP unlimited
```

To create a **memory\_over\_execution** *resource group*, with high *tier*
capacity limits, but low execution options:

```sql CREATE RESOURCE GROUP with Tier Limits & Options Example theme={null}
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:

```sql CREATE RESOURCE GROUP with Ranking Example theme={null}
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
)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.