我正在尝试评估程序的峰值内存(在 Docker 映像中)。我cat proc/meminfo
在最后运行,但没有看到 HighTotal,知道这是为什么吗?
(使用 docker 的 debian:latest)
cat /proc/meminfo
MemTotal: 2046752 kB
MemFree: 1781060 kB
MemAvailable: 1782308 kB
Buffers: 7004 kB
Cached: 169056 kB
SwapCached: 2480 kB
Active: 116740 kB
Inactive: 93680 kB
Active(anon): 42712 kB
Inactive(anon): 43016 kB
Active(file): 74028 kB
Inactive(file): 50664 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 1048572 kB
SwapFree: 898920 kB
Dirty: 124 kB
Writeback: 0 kB
AnonPages: 32032 kB
Mapped: 38144 kB
Shmem: 51332 kB
Slab: 37356 kB
SReclaimable: 16256 kB
SUnreclaim: 21100 kB
KernelStack: 3664 kB
PageTables: 1172 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 2071948 kB
Committed_AS: 743920 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
AnonHugePages: 0 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 28672 kB
DirectMap2M: 2068480 kB
DirectMap1G: 3145728 kB
答案1
HighTotal
表示高内存总量,并且仅在配置了 . 的 32 位内核上显示CONFIG_HIGHMEM
。
它与进程使用的内存量无关。要看到这一点,请使用 运行它/usr/bin/time
。