
三网合一网站建设公司:VSZ和RSS
其中“-b”和“.I”指定的都已经是Linux可接受的最小值,以获取尽可能大的mnodes。
又比如,采用tmpfs的缓存盘mnodes不足的时候,没法用reiserfs来挂载内存,但是
可以单独指定让tmpfs本身也放开这个mnodes的限制。
在Linux源码文档中,对tmpfs的mnodes有如下描述。
nr_inodes: The maximum number of modes for this instance. The default
is half of the number of your physical RAM pages, or (on a
machine with highmem) the number of lowmem RAM pages,
whichever is the lower. .
These parameters accept a suffix k, m or g for kilo, mega and giga and
can be changed on remount. The size parameter also accepts a suffix%to limit
this tmpfs instance t.that percentage of your physical RAM:
the default, when neither size nor nr blocks is specified, is size=50%
if nr inodes=0, mnodes will not be limited.
所以,我们只要在mount的时候指定nr mnodes参数为0,就可以不受mnodes限制了,
$ mount -t tmpfs -o s;ize=2000M,mode=777,n:c_inodes-0 tmpfs /tmpfs
$ df -ilgrep tmpfs
tmpfs :0~0' . '.0 . - /tmpfs
1.2.4 ps
ps命令也有多种用法。最常见的是ps auxfww,其输出如下。
这样,能以树的形式显示进程间的父子关系,又能比pstree命令多出CPU和MEM等
其他性能数据。
在这里,需要注意的是VSZ和RSS两列。
⑦ VSZ(Virtual Memory Size):指进程可以占用的内存地址空间的大小。
@RSS(Resident Set Size):指进程实际占用的内存地址空间的大小。
但是要注意:RSS中包括了共享库占用的内存大小,比如“libc”等。我们可以通过
pmap命令看到进程调用的各种库占用的内存如下。