惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
IT之家
IT之家
博客园_首页
人人都是产品经理
人人都是产品经理
博客园 - Franky
I
InfoQ
Recent Announcements
Recent Announcements
P
Proofpoint News Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
月光博客
月光博客
Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog RSS Feed
MongoDB | Blog
MongoDB | Blog
雷峰网
雷峰网
博客园 - 聂微东
N
Netflix TechBlog - Medium
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The GitHub Blog
The GitHub Blog
D
Docker

博客园 - digdeep

javax.imageio.IIOException: Invalid icc profile: duplicate sequence numbers Tomcat配置支持软连接 记一例DNS解析导致的系统卡顿问题 nginx配置透传自定义文件头 访问RustFS中的图片时,浏览器报错 (failed)net::ERR_BLOCKED_BY_ORB mysql主从复制报错:Last_Errno: 1872 Last_Error: Slave failed to initialize relay log info structure from the repository 华为云平台的操作系统因为OOM而重启的解决方法 passwd 修改密码报错“passwd: 鉴定令牌操作错误” mysql主从复制报错:Last_SQL_Errno: 1114 Last_SQL_Error: Coordinator stopped because there were error(s) in the worker(s) 解决Linux下生成PDF中文乱码的问题 mysql主从复制从库报错:Last_Errno: 1594 centos编译安装opencv mysql搭建主从复制时一直报错 Last_IO_Errno: 2026 ./configure: error: SSL modules require the OpenSSL library. maven mvn install 报错: unable to find valid certification path to requested target 错误 升级Nginx,--with-openssl踩坑记录 Name or service not known Kernel panic - not syncing: Out of memory: system-wide panic_on_oom is enabled ERROR 2059 (HY000): Plugin caching_sha2_password could not be loaded gh-ost 报错 ERROR 1236 (HY000): A slave with the same server_uuid/server_id as this slave
kswapd0进程占用cpu非常高
digdeep · 2024-09-07 · via 博客园 - digdeep

早上,遇到一起故障,调查显示kswapd0进程的内存使用率很高,系统负载从平时的0.x升高到了260多。

查到原因是,同事代码逻辑错误,不断的死循环向表里面添加数据,记录数达到了2.7千万。然后对该表 alter table add index xxx,导致了mysqld内存不断的膨胀,导致需要使用到了swap分区的虚拟内存,然后导致kswapd0进程的CPU使用率升高。

登录系统后,通过top命令查到kwsapd0的CPU使用很高,多次尝试用 kill -9 xxx 杀死改进程,但是无效。

kswapd0 占用过高是因为 物理内存不足,使用swap分区与内存换页操作交换数据,导致CPU占用过高

一两分钟之后,华为云平台监控到了系统异常,自动重启了操作系统。

后面重启应用和各中间件,清理超大表的数据。系统恢复正常。