缓冲内存使用率非常高

缓冲内存使用率非常高

这是正常的吗?我从来没有见过这么高的缓冲区?

$ cat /proc/meminfo 
MemTotal: 16332808 kB
MemFree: 1112264 kB
Buffers: 10630124 kB
Cached: 699400 kB
SwapCached: 0 kB
Active: 3262924 kB
Inactive: 8132004 kB
Active(anon): 27464 kB
Inactive(anon): 38888 kB
Active(file): 3235460 kB
Inactive(file): 8093116 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 525308 kB
SwapFree: 525308 kB
Dirty: 40 kB
Writeback: 0 kB
AnonPages: 65412 kB
Mapped: 11300 kB
Shmem: 940 kB
Slab: 3674368 kB
SReclaimable: 3652612 kB
SUnreclaim: 21756 kB
KernelStack: 1496 kB
PageTables: 3340 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 8691712 kB
Committed_AS: 594304 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 102232 kB
VmallocChunk: 34359634044 kB
HardwareCorrupted: 0 kB
DirectMap4k: 2048 kB
DirectMap2M: 16691200 kB

答案1

这是不正常的,但它可能会发生,具体取决于您正在做什么或正在做什么。根据proc 文件系统的内核文档,“缓冲区”是缓存的原始磁盘数据使用的内存量,而不是“缓存”是缓存的文件数据使用的内存量。

缓冲区通常应比缓存小得多,但如果执行大量直接磁盘 IO,则可以使缓冲区激增。我能够通过跑步使我的体重显着增加sudo dd if=/dev/sda of=/dev/null bs=1M count=16384。这是我的结果。

$ cat /proc/meminfo 
MemTotal:       16435344 kB
MemFree:          187388 kB
Buffers:         5655192 kB
Cached:          8473748 kB
SwapCached:            0 kB
Active:          7141492 kB
Inactive:        8228596 kB
Active(anon):    1073180 kB
Inactive(anon):   169312 kB
Active(file):    6068312 kB
Inactive(file):  8059284 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       4192928 kB
SwapFree:        4192928 kB
Dirty:                36 kB
Writeback:             0 kB
AnonPages:       1241160 kB
Mapped:           437492 kB
Shmem:              1336 kB
Slab:             256696 kB
SReclaimable:     206660 kB
SUnreclaim:        50036 kB
KernelStack:        3160 kB
PageTables:        12224 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    12410600 kB
Committed_AS:    3064896 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      306540 kB
VmallocChunk:   34359429104 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       58816 kB
DirectMap2M:    16717824 kB

有没有执行大量块 IO 的程序?

相关内容