•The INFORMATION_SCHEMA.RESOURCE_GROUPS  table exposes information about resource group definitions and the Performance Schema threads  table shows the resource group assignment for each thread. 

•Status variables provide execution counts for each management SQL statement. 

## Resource Group Attributes 

Resource groups have attributes that define the group. All attributes can be set at group creation time. Some attributes are fixed at creation time; others can be modified any time thereafter. 

These attributes are defined at resource group creation time and cannot be modified: 

•Each group has a name. Resource group names are identifiers like table and column names, and need not be quoted in SQL statements unless they contain special characters or are reserved words. Group names are not case-sensitive and may be up to 64 characters long. 

•Each group has a type, which is either SYSTEM  or USER . The resource group type affects the range of priority values assignable to the group, as described later. This attribute together with the differences in permitted priorities enables system threads to be identified so as to protect them from contention for CPU resources against user threads. 

System and user threads correspond to background and foreground threads as listed in the Performance Schema threads  table. 

These attributes are defined at resource group creation time and can be modified any time thereafter: 

•The CPU affinity is the set of virtual CPUs the resource group can use. An affinity can be any nonempty subset of the available CPUs. If a group has no affinity, it can use all available CPUs. 

•The thread priority is the execution priority for threads assigned to the resource group. Priority values range from -20 (highest priority) to 19 (lowest priority). The default priority is 0, for both system and user groups. 

System groups are permitted a higher priority than user groups, ensuring that user threads never have a higher priority than system threads: 

•For system resource groups, the permitted priority range is -20 to 0. 

•For user resource groups, the permitted priority range is 0 to 19. 

•Each group can be enabled or disabled, affording administrators control over thread assignment. Threads can be assigned only to enabled groups. 

## Resource Group Management 

By default, there is one system group and one user group, named SYS_default  and USR_default , respectively. These default groups cannot be dropped and their attributes cannot be modified. Each default group has no CPU affinity and priority 0. 

Newly created system and user threads are assigned to the SYS_default  and USR_default  groups, respectively. 

For user-defined resource groups, all attributes are assigned at group creation time. After a group has been created, its attributes can be modified, with the exception of the name and type attributes. 

To create and manage user-defined resource groups, use these SQL statements: 

