In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The role of the resource group is to isolate resources (you can understand it as the hardware configuration checked when activating the CVM). Assign the slow SQL thread id online to a core of the CPU and let it run slowly, so as not to affect the overall performance of the CPU.
Create a resource group
Mysql > create resource group slowsql_rg type=user vcpu=3 thread_priority=19 enable
Slowsql_rg is the resource group name
The source of type=user is the slow SQL of the client.
Which CPU core does vcpu=3 assign it to (you can use cat / proc/cpuinfo | grep processor to see how many cores CPU has)
Thread_priority is the priority, with a range of 0 to 19. 19 is the lowest priority and 0 is the highest priority.
View resource group information
Mysql > select * from information_schema.resource_groups
Find the thread ID of slow SQL
SELECT THREAD_ID,PROCESSLIST_INFO,RESOURCE_GROUP,PROCESSLIST_TIME FROM performance_schema.threads WHERE PROCESSLIST_INFO REGEXP 'SELECT | INSERT | UPDATE | DELETE | ALTER' AND PROCESSLIST_TIME > 10
Put the value taken out by THREAD_ID into the resource group as a restriction
Set resource group slowsql_rg for 379
For example, you can also change the restrictions you want to relax.
ALTER RESOURCE GROUP slowsql_rg VCPU = 3 THREAD_PRIORITY = 0
Close the resource group and lift the restriction
ALTER RESOURCE GROUP slowsql_rg DISABLE FORCE
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.