Linux奇怪的内存报告

Linux奇怪的内存报告

我捕获了以下 meminfo。

我不明白空闲内存是如何从 8GB 增加到几乎 25GB 的,而当时只释放了大约 4GB 的平板。获取 meminfo 输出时,进程内存消耗没有变化。

第一个具有 8GB 可用内存的 meminfo:

MemTotal:       66054256 kB
MemFree:         8344960 kB
Buffers:            1120 kB
Cached:         30172312 kB
SwapCached:            0 kB
Active:         10795428 kB
Inactive:        1914512 kB
Active(anon):   10193124 kB
Inactive(anon):  1441288 kB
Active(file):     602304 kB
Inactive(file):   473224 kB
Unevictable:    26348912 kB
Mlocked:        26348960 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:       8886304 kB
Mapped:         26383052 kB
Shmem:          29097904 kB
Slab:            6006384 kB
SReclaimable:    3512404 kB
SUnreclaim:      2493980 kB
KernelStack:       15240 kB
PageTables:        78724 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    33027128 kB
Committed_AS:   44446908 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      426656 kB
VmallocChunk:   34325375716 kB
HardwareCorrupted:     0 kB
AnonHugePages:   7696384 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:        6144 kB
DirectMap2M:     2058240 kB
DirectMap1G:    65011712 kB

第二次内存捕获,剩余内存接近 25GB:

MemTotal:       66054256 kB
MemFree:        24949116 kB
Buffers:            1120 kB
Cached:         29085016 kB
SwapCached:            0 kB
Active:         10168904 kB
Inactive:        1461156 kB
Active(anon):   10168216 kB
Inactive(anon):  1441956 kB
Active(file):        688 kB
Inactive(file):    19200 kB
Unevictable:    26317328 kB
Mlocked:        26317376 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:       8861224 kB
Mapped:         26351488 kB
Shmem:          29066248 kB
Slab:            1503440 kB
SReclaimable:     232880 kB
SUnreclaim:      1270560 kB
KernelStack:       15256 kB
PageTables:        79664 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    33027128 kB
Committed_AS:   44418280 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      426656 kB
VmallocChunk:   34325375716 kB
HardwareCorrupted:     0 kB
AnonHugePages:   7665664 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:        6144 kB
DirectMap2M:     2058240 kB
DirectMap1G:    65011712 kB

相关内容