Linux-Kernel

什麼決定了kswapd:s的數量?

  • June 2, 2020

在這個系統上只有 8kswapd秒:

top - 00:10:37 up  3:18,  5 users,  load average: 60.96, 61.95, 58.34
Tasks: 4318 total,  47 running, 2433 sleeping, 1836 stopped,   2 zombie
%Cpu(s):  0.2 us, 80.9 sy,  4.4 ni, 11.6 id,  0.2 wa,  0.0 hi,  2.8 si,  0.0 st
GiB Mem :    472.4 total,      1.2 free,    470.5 used,      0.7 buff/cache
GiB Swap:  16681.0 total,  14502.9 free,   2178.1 used.      0.1 avail Mem 

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                        
   437 root      20   0       0      0      0 R  97.6   0.0  54:16.04 kswapd3                                        
   439 root      20   0       0      0      0 R  89.9   0.0  50:29.51 kswapd5                                        
   436 root      20   0       0      0      0 R  88.7   0.0  46:20.85 kswapd2                                        
   441 root      20   0       0      0      0 R  87.5   0.0  50:12.31 kswapd7                                        
   434 root      20   0       0      0      0 R  82.8   0.0  41:19.56 kswapd0                                        
   438 root      20   0       0      0      0 R  81.6   0.0  51:17.61 kswapd4                                        
   435 root      20   0       0      0      0 R  76.3   0.0  44:02.43 kswapd1                                        
   440 root      20   0       0      0      0 R  74.2   0.0  44:34.82 kswapd6                                        
1005926 tange     39  19  789232 778236   1448 S  34.1   0.2   0:06.77 swapout                                        
1009124 tange     39  19  780016 769156   1576 S  32.6   0.2   0:03.25 swapout                                        

什麼決定了kswapd執行的次數?

每個記憶體節點一個kswapd帶有附加記憶體的節點(在 NUMA 意義上)。

引用自:https://unix.stackexchange.com/questions/590325