大网数据广告活动
服务器运维问答

All CPU busy, high avg load, but tasks CPU usage don't add up

· 52CE 我爱测

Looking at the outputs below, could someone tell me what is causing the high load? CentOs 6 Linux 2.6.32-642.4.2.el6.x86_64 (4 CPU) Im suspecting that sar numbers are high but Im not experienced with that. [root@a1 ~]# sar -b 1 3…

问题原文

原帖链接 · Skacc · CC BY-SA 3.0

Looking at the outputs below, could someone tell me what is causing the high load?

CentOs 6 Linux 2.6.32-642.4.2.el6.x86_64 (4 CPU)

Im suspecting that sar numbers are high but Im not experienced with that.

[root@a1 ~]# sar -b 1 3
01:08:22 PM       tps      rtps      wtps   bread/s   bwrtn/s
01:08:23 PM    225.74      7.92    217.82    269.31  13362.38
01:08:24 PM    116.67     74.51     42.16   4062.75    188.24
01:08:25 PM    161.22     64.29     96.94   3240.82    840.82
Average:       167.77     48.84    118.94   2522.26   4821.26

[root@a1 ~]# sar -w 1 3
01:09:46 PM    proc/s   cswch/s
01:09:47 PM     13.13   6662.63
01:09:48 PM     17.82   3891.09
01:09:49 PM     20.20   5031.31
Average:        17.06   5186.29

top output (shows high load avegare)

htop (video, shows all busy CPU)
https://www.lot-art.com/htop.mp4

top (video, shows what each CPU core is doing)
https://www.lot-art.com/top.mp4

ps auxf output
https://www.lot-art.com/ps_auxf.txt

pidstat -w output
https://www.lot-art.com/pidstat_w.txt

已采纳解答

原帖链接 · ThoriumBR · CC BY-SA 3.0

Your high usage is from mysql. You have some queries consuming too much resources, php-cgi is left waiting for the database queries to finish and httpd is left waiting php-cgi to return. If you determine which queries are responsible for this consumption, you can optimize those queries.

And your load is not that high. You have 4 processors, any load close to 4 is not high. A max load of 5.4 is acceptable.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-04-05)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。