当我们使用 FTP 将文件 PUT 到另一台主机时,kcompactd 会出现峰值,并且传输速率会下降。
top - 18:39:59 up 31 days, 6:23, 4 users, load average: 1.15, 0.42, 0.32
Tasks: 1947 total, 2 running, 1942 sleeping, 0 stopped, 3 zombie
%Cpu0 : 2.9 us, 29.4 sy, 0.0 ni, 66.7 id, 0.0 wa, 0.0 hi, 1.0 si, 0.0 st
%Cpu1 : 1.0 us, 13.7 sy, 0.0 ni, 80.4 id, 4.9 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu2 : 0.0 us, 23.5 sy, 0.0 ni, 75.5 id, 1.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu3 : 0.0 us, 44.3 sy, 0.0 ni, 55.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 82382288 total, 81858160 used, 524128 free, 38692 buffers
KiB Swap: 4194300 total, 9508 used, 4184792 free. 14808308 cached Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
32 root 20 0 0 0 0 R 88.57 0.000 289:18.19 kcompactd0
18324 root 20 0 44160 7452 5712 S 9.524 0.009 0:19.85 lftp
为什么会这样呢?
操作系统是 SLES12-SP3,运行内核 4.4.162-94.72-default
/proc/meminfo
MemTotal: 82382284 kB
MemFree: 649840 kB
MemAvailable: 10539176 kB
Buffers: 41912 kB
Cached: 14042992 kB
SwapCached: 468 kB
Active: 21716412 kB
Inactive: 6664344 kB
Active(anon): 16632900 kB
Inactive(anon): 1822684 kB
Active(file): 5083512 kB
Inactive(file): 4841660 kB
Unevictable: 80 kB
Mlocked: 80 kB
SwapTotal: 4194300 kB
SwapFree: 4184324 kB
Dirty: 624 kB
Writeback: 0 kB
AnonPages: 14295500 kB
Mapped: 218488 kB
Shmem: 4159732 kB
Slab: 901184 kB
SReclaimable: 728604 kB
SUnreclaim: 172580 kB
KernelStack: 35520 kB
PageTables: 938124 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 19785440 kB
Committed_AS: 29080800 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
HugePages_Total: 25000
HugePages_Free: 2223
HugePages_Rsvd: 18
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 5922752 kB
DirectMap2M: 30777344 kB
DirectMap1G: 49283072 kB
答案1
更新内核修复了这个顺便说一句...