- Set the CAP_SYS_NICE capability to mysqld:
shell> ps aux | grep mysqld | grep -v grepmysql 5238 0.0 28.1 1253368 488472 ? Sl Nov19 4:04 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pidshell> sudo setcap cap_sys_nice+ep /usr/sbin/mysqldshell> getcap /usr/sbin/mysqld/usr/sbin/mysqld = cap_sys_nice+ep
- Create a resource group using the CREATE RESOURCE GROUP statement. You have to mention the resource group name, number of VCPUS, thread priority, and type, which can be either USER or SYSTEM. If you do not specify the VCPU, all the CPUs will be used:
mysql> CREATE RESOURCE GROUP report_groupTYPE = USERVCPU = 2-3THREAD_PRIORITY = 15ENABLE;# You should have at least 4 CPUs for the above resource group to create. ...