刚刚转移到一个新的(更强大的)服务器,上面只运行一个网站,网站没有任何变化,但现在我的 CPU 负载非常高,我找不到原因。
顶部:
top - 22:54:08 up 1 day, 3:08, 1 user, load average: 4.19, 3.66, 3.60
Tasks: 425 total, 1 running, 424 sleeping, 0 stopped, 0 zombie
Cpu(s): 22.4%us, 5.7%sy, 0.0%ni, 71.7%id, 0.0%wa, 0.1%hi, 0.1%si, 0.0%st
Mem: 49422228k total, 12798552k used, 36623676k free, 582432k buffers
Swap: 1048568k total, 0k used, 1048568k free, 9841796k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
27557 mysql 20 0 1913m 63m 6928 S 504.9 0.1 648:25.57 mysqld
当做strace -p < PID >,我得到了以下结果,但是由于我之前从未使用过 strace,所以这对我来说没有任何意义:
select(13, [10 12], NULL, NULL, NULL) = 1 (in [12])
fcntl(12, F_SETFL, O_RDWR|O_NONBLOCK) = 0
accept(12, {sa_family=AF_FILE, NULL}, [2]) = 73
fcntl(12, F_SETFL, O_RDWR) = 0
getsockname(73, {sa_family=AF_FILE, path="/var/lib/mysql\1"}, [28]) = 0
fcntl(73, F_SETFL, O_RDONLY) = 0
fcntl(73, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(73, F_SETFL, O_RDWR|O_NONBLOCK) = 0
setsockopt(73, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported)
gettimeofday({1399667305, 899867}, NULL) = 0
clone(child_stack=0x7f19a819ff10, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f19a81a09d0, tls=0x7f19a81a0700, child_tidptr=0x7f19a81a09d0) = 23139
iotop给了我一个很高的 kjournal:
432 be/4 root 0.00 B/s 7.47 K/s 0.00 % 7.30 % [kjournald]
你看到那里有什么吗?你能告诉我在哪里可以找到问题的根源吗?这会不会与我现在拥有的 Raid-10 有关?