当前位置:网站首页>MySQL CPU使用率飙升,如何定位是被谁占用了
MySQL CPU使用率飙升,如何定位是被谁占用了
2022-07-17 21:35:00 【51CTO】
当有时发现系统反应慢,查看MySQL进程的CPU使用率超出了平常水平的几倍,接下来介绍如何定位。
如下图,MySQL的CPU使用率高,负载亦高

通过 top -Hp 1308 命令查看MySQL进程中哪些线程占用了较高的CPU资源

接下来,我们要确定上面那些CPU占用高的是什么线程,它们在做什么?
执行以下SQL:
SELECT a.THREAD_OS_ID,b.user,b.host,b.db,b.command,b.time,b.state,b.info
FROM performance_schema.threads a, information_schema.processlist b
WHERE b.id = a.processlist_id And b.command !='Sleep'
这里可以清楚的看到线程在做什么事

我们发现通过top -Hp pid 查到的线程与上面存在一一对应情况。这时我们定位到了是seata相关的分布式事务引起了MySQL占用了大量的CPU资源。下一步交由相关负责人处理。
边栏推荐
- Read the paper: temporary graph networks for deep learning on dynamic graphs
- Huawei wireless devices are configured with static load balancing
- ShanDong Multi-University Training #3
- Optimal Biking Strategy【DP + 二分】
- Explain the operation of C language file in detail
- Problème de la valeur maximale de la fenêtre coulissante
- Redis source code and design analysis -- 3 Dictionaries
- 详解C语言动态内存管理
- 非凸優化問題經典必看綜述“從對稱性到幾何性”,羅切斯特大學等
- Codeforces Round #808 (Div. 1)(A~C)
猜你喜欢

si446使用记录(三):MATCH功能

华为无线设备配置智能漫游

Qchartview overwrites the previous control when it is added in qgridlayout

4 a company has branches in six cities C1, C2, C3... C6. The connection between cities Ci and CJ (I, j=1,2,3,... 6) and the cost are listed in the following weighted adjacency matrix C

Redis源码与设计剖析 -- 3.字典

matplotlib绘制多折线图(解决matplotlib中文无法显示问题)

Optimal Biking Strategy【DP + 二分】

Problème de la valeur maximale de la fenêtre coulissante

00 后博士获聘南大特任副研究员,曾 4 岁上小学,14 岁考入南大!

O'Neill's RPS curve compilation method (original by Dr. Tao)
随机推荐
歐奈爾的RPS曲線的編制方法(陶博士原創)
Redis source code and design analysis -- 3 Dictionaries
Manuel incomplet, comment tracer manuellement l'information de surveillance de tongweb?
Colliding mice collision engineering analysis
华为无线设备配置智能漫游
Use tongweb's hot deployment function with caution
Logu: p4516 [jsoi2018] stealth action (tree DP, tree grouping knapsack statistical scheme number)
Principle and simple implementation of custom MVC
华为无线设备配置频谱导航
Is it true that tongdaxin opens an account? Is it safe for tongdaxin to open an account?
C. Watto and Mechanism(哈希 | 字典树 + dfs (树上dfs))
Encrypt Ogg users
坐标模拟矩阵旋转的公式
273. Grading - acwing question bank [DP]
Keil环境下STM32定位hardfault位置方法和遇到的情况
【MQTT从入门到提高系列 | 06】MQTT3.1.1之SUBSCRIBE订阅工作流
05--- antireflective film
ClassNotFoundException:com. tongweb. geronimo. osgi. locator. ProviderLocator
O'Neill's RPS curve compilation method (original by Dr. Tao)
Use of token in ogg