PDF (A4) - 43.4Mb
Man Pages (TGZ) - 297.3Kb
Man Pages (Zip) - 402.5Kb
Info (Gzip) - 4.3Mb
Info (Zip) - 4.3Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
Security in MySQL
Starting and Stopping MySQL
MySQL and Linux/Unix
MySQL and Windows
MySQL and macOS
MySQL and Solaris
Building MySQL from Source
MySQL Restrictions and Limitations
MySQL Partitioning
MySQL Tutorial
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL NDB Cluster 8.0
CREATE RESOURCE GROUPgroup_name TYPE = {SYSTEM|USER} [VCPU [=]vcpu_spec [,vcpu_spec] ...] [THREAD_PRIORITY [=]N] [ENABLE|DISABLE]vcpu_spec: {N |M -N}CREATE RESOURCE GROUP is used for resource group management (seeSection 7.1.16, “Resource Groups”). This statement creates a new resource group and assigns its initial attribute values. It requires theRESOURCE_GROUP_ADMIN privilege.
group_name identifies which resource group to create. If the group already exists, an error occurs.
TheTYPE attribute is required. It should beSYSTEM for a system resource group,USER for a user resource group. The group type affects permittedTHREAD_PRIORITY values, as described later.
TheVCPU attribute indicates the CPU affinity; that is, the set of virtual CPUs the group can use:
If
VCPUis not given, the resource group has no CPU affinity and can use all available CPUs.If
VCPUis given, the attribute value is a list of comma-separated CPU numbers or ranges:Each number must be an integer in the range from 0 to the number of CPUs − 1. For example, on a system with 64 CPUs, the number can range from 0 to 63.
A range is given in the form
M−N, whereMis less than or equal toNand both numbers are in the CPU range.If a CPU number is an integer outside the permitted range or is not an integer, an error occurs.
ExampleVCPU specifiers (these are all equivalent):
VCPU = 0,1,2,3,9,10VCPU = 0-3,9-10VCPU = 9,10,0-3VCPU = 0,10,1,9,3,2 TheTHREAD_PRIORITY attribute indicates the priority for threads assigned to the group:
If
THREAD_PRIORITYis not given, the default priority is 0.If
THREAD_PRIORITYis given, the attribute value must be in the range from -20 (highest priority) to 19 (lowest priority). The priority for system resource groups must be in the range from -20 to 0. The priority for user resource groups must be in the range from 0 to 19. Use of different ranges for system and user groups ensures that user threads never have a higher priority than system threads.
ENABLE andDISABLE specify that the resource group is initially enabled or disabled. If neither is specified, the group is enabled by default. A disabled group cannot have threads assigned to it.
Examples:
Create an enabled user group that has a single CPU and the lowest priority:
CREATE RESOURCE GROUP rg1 TYPE = USER VCPU = 0 THREAD_PRIORITY = 19;Create a disabled system group that has no CPU affinity (can use all CPUs) and the highest priority:
CREATE RESOURCE GROUP rg2 TYPE = SYSTEM THREAD_PRIORITY = -20 DISABLE;
Resource group management is local to the server on which it occurs.CREATE RESOURCE GROUP statements are not written to the binary log and are not replicated.
PDF (A4) - 43.4Mb
Man Pages (TGZ) - 297.3Kb
Man Pages (Zip) - 402.5Kb
Info (Gzip) - 4.3Mb
Info (Zip) - 4.3Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
Security in MySQL
Starting and Stopping MySQL
MySQL and Linux/Unix
MySQL and Windows
MySQL and macOS
MySQL and Solaris
Building MySQL from Source
MySQL Restrictions and Limitations
MySQL Partitioning
MySQL Tutorial
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL NDB Cluster 8.0