Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> 關於 Linux

Linux 記憶體耗盡排查實戰:top 發現佔用高、vmstat -m 定位 xfs_inode 洩漏

編輯:關於 Linux

現象

NAS 壓測長寫,top -M 顯示記憶體近滿(62.6/63 GB),但單一進程 %MEM 僅 0.x%。

深入分析:vmstat -m

vmstat -m
...
xfs_ili        7564110  8351947  224  17
xfs_inode      7564205  8484180  1024  4
...

發現 xfs_ili、xfs_inode 佔用大量 slab 快取(數百萬物件),推測為 XFS inode 快取未釋放導致記憶體洩漏。

結語

top 看總用量、vmstat -m 看核心 slab 分配,兩者結合可精準定位「記憶體用去哪兒」,進而鎖定檔案系統或驅動層洩漏。

Copyright © Windows教程網 All Rights Reserved