sar -B 可以提供内存相关的指标
pgpgin/s:从磁盘读入内存
Total number of kilobytes the system paged in from disk per second.
pgpgout/s: 从内存写入磁盘
Total number of kilobytes the system paged out to disk per second.
fault/s:系统产生的缺页异常
Number of page faults (major + minor) made by the system per second. This is not a count of page faults that generate I/O, because some page faults can be resolved without I/O.
majflt/s:需要读磁盘才能解决的缺页异常
Number of major faults the system has made per second, those which have required loading a memory page from disk.
minor page fualts: 不需要读磁盘就能处理的缺页异常.
pgfree/s: 释放page到伙伴系统
Number of pages placed on the free list by the system per second.
pgscank/s : kswap线程扫描的页面
Number of pages scanned by the kswapd daemon per second.
pgscand/s:直接内存回收扫描的页面内存相关性能指标
Number of pages scanned directly per second.内存相关性能指标
pgsteal/s:从swap和cache中回收的页面
Number of pages the system has reclaimed from cache (pagecache and swapcache) per second to satisfy its memory demands.
%vmeff:pgsteal/(pgscank+pgscank) 数值越大,表示能够被回收的页表更多.
Calculated as pgsteal / pgscan, this is a metric of the efficiency of page reclaim. If it is near 100% then almost every page coming off the tail of the inactive list is being reaped. If it gets too low (e.g. less than 30%) then the virtual memory is having some difficulty. This field is displayed as zero if no pages have been scanned during the interval of time.
swap/活跃/非活跃内存
vmstat -a -w 1
swpd:交换到硬盘的内存总量
free:空闲内存
inact: anno inact +file inact
active: anno act+ file act
buff: 文件写缓冲区内存大小
slabinfo信息
cat /proc/slabinfo
vmstat -m 1
slabtop
OBJS ACTIVE USE OBJ_SIZE SLABS OBJ/SLAB CACHE SIZE NAME
OBJS: objs总的数量
ACTIVE:正在使用的objs数量
USE: (ACTIVE*100)/OBJS
swap的速率:
采样间隔内内存交换速率
pages swaped in: 从交换分区读入内存的内存总量
pages swaped out:从系统内存写入交换分区的总量
kbcommit:保证当前系统所需要的内存,即为了确保不溢出而需要的内存(RAM+swap).
从/proc/meminfo读取出来
%commit:这个值是kbcommit与内存总量(包括swap)的一个百分比.
进程内存统计:
cat /proc/pid/status