我有一个Linux服务器。它正在运行java进程,即kafka。我设置了vm.swaness = 10。但是我看到交换容量不断增加,有很多可用内存空间。有人可以向我解释一下这的根本原因吗?我的应用程序仍然运行良好,但不断增加的交换导致了一些警告。
[root@micro-kafka01 sysdba]# top -b -n1 -o RES
top - 13:39:21 up 68 days, 21:42, 1 user, load average: 5.03, 4.71, 4.88
Tasks: 266 total, 2 running, 264 sleeping, 0 stopped, 0 zombie
%Cpu(s): 56.2 us, 9.7 sy, 0.0 ni, 31.2 id, 0.0 wa, 0.0 hi, 2.8 si, 0.0 st
KiB Mem : 49293772 total, 289180 free, 32103672 used, 16900920 buff/cache
KiB Swap: 8392700 total, 964544 free, 7428156 used. 16106396 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6586 microka+ 20 0 204.3g 26.9g 57352 S 517.6 57.2 364517:50 java
8165 microka+ 20 0 10.5g 763088 2828 S 0.0 1.5 22494:50 kafka_exporter
6376 microka+ 20 0 8952432 527588 5916 S 0.0 1.1 456:46.74 java
3688 oracle 20 0 5944276 417544 5976 S 0.0 0.8 180:31.61 java
1817 root 20 0 3398916 272708 65504 S 0.0 0.6 1627:26 lightagent
2292 root 20 0 602088 271352 5708 S 0.0 0.6 1038:31 splunkd
25419 root 20 0 711476 223912 4916 S 0.0 0.5 5:37.05 salt-minion
2003 root 20 0 3222560 89984 77732 S 0.0 0.2 68:35.68 cvd
1784 root 20 0 1831988 75056 11388 S 0.0 0.2 698:11.24 klnagent
2529 root 20 0 778156 31716 9168 R 5.9 0.1 2283:11 BESClient
1451 root 20 0 586428 21216 5748 S 0.0 0.0 9:05.52 tuned
8138 microka+ 20 0 116720 13596 1736 S 0.0 0.0 27:17.37 node_exporter
1069 polkitd 20 0 614428 10880 4396 S 0.0 0.0 2:13.58 polkitd
2314 root 20 0 130944 9440 640 S 0.0 0.0 2:18.50 splunkd
2022 root 20 0 1217164 9004 7700 S 0.0 0.0 17:12.01 ClMgrS
1456 root 20 0 801808 8872 5452 S 0.0 0.0 8:14.39 rsyslogd
[root@micro-kafka01 sysdba]# free -h
total used free shared buff/cache available
Mem: 47G 30G 291M 601M 16G 15G
Swap: 8.0G 7.1G 941M