top - 14:51:31 up 11:24, 5 users, load average: 0.79, 0.95, 0.97
Tasks: 173 total, 2 running, 171 sleeping, 0 stopped, 0 zombie
%Cpu(s): 9.1 us, 4.5 sy, 0.0 ni, 85.5 id, 0.0 wa, 0.0 hi, 1.0 si, 0.0 st
KiB Mem : 32601524 total, 24374660 free, 2048104 used, 6178760 buff/cache
KiB Swap: 8191996 total, 8191996 free, 0 used. 28478564 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
27018 mysql 20 0 7548496 1.682g 12528 S 91.7 5.4 56:12.75 /usr/sbin/mysqld
Mysql 用户使用率约为 91.7%,但 %cpu 是 9.1 这是什么意思?
该服务器仅运行 mysql
答案1
作为@c4f4t0r前面已经提到过,这意味着您的机器上有多个 CPU 核心。您可以按1
并查看每个 CPU 的负载。它应该看起来像:
top - 11:14:48 up 100 days, 13:14, 1 user, load average: 1.31, 1.52, 1.60
Tasks: 302 total, 1 running, 301 sleeping, 0 stopped, 0 zombie
Cpu0 : 20.5%us, 6.9%sy, 0.0%ni, 43.2%id, 28.1%wa, 0.0%hi, 0.0%si, 1.3%st
Cpu1 : 12.7%us, 0.7%sy, 0.0%ni, 85.3%id, 0.0%wa, 0.0%hi, 0.0%si, 1.3%st
Cpu2 : 4.6%us, 1.3%sy, 0.0%ni, 92.1%id, 0.0%wa, 0.0%hi, 0.0%si, 2.0%st
Cpu3 : 37.6%us, 5.0%sy, 0.0%ni, 55.4%id, 0.0%wa, 0.0%hi, 0.7%si, 1.3%st
Cpu4 : 42.0%us, 1.0%sy, 0.0%ni, 53.4%id, 2.0%wa, 0.0%hi, 0.0%si, 1.6%st
Cpu5 : 8.9%us, 0.7%sy, 0.0%ni, 89.1%id, 0.3%wa, 0.0%hi, 0.0%si, 1.0%st
Mem: 10127380k total, 9939356k used, 188024k free, 165304k buffers
Swap: 1020k total, 1020k used, 0k free, 3213328k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9364 mysql 20 0 9858m 5.6g 5068 S 103.6 57.5 40717:04 mysqld
答案2
这意味着你的系统有多个 CPU 核心,而 91.7 是一个核心
man 1 top | less +/Irix