Chinaunix首页 | 论坛 | 博客
  • 博客访问: 307829
  • 博文数量: 35
  • 博客积分: 825
  • 博客等级:
  • 技术积分: 913
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-11 09:44
文章分类

全部博文(35)

文章存档

2013年(10)

2012年(24)

2010年(1)

我的朋友

分类: LINUX

2013-01-24 11:36:25

这两天在测试mongodb的性能 top命令看看mongodb吃内存的情况 说来很惭愧 之前没有详细地看top命令的输出结果 只是大致地看一下 然后就闪过 man了top 看了一下输出结果中的三个字段代表的意思 使用了top -p mongodb_pid 只查看mongodb的状态 


VIRT Virtual Image (kb) 

进程所使用的虚拟内存的总和,包括了代码段,数据段,共享库和被换出(swapped out)的内存大小


RES Resident size (kb)

目前驻存在内存中实际占用量 


SHR Shared Mem size (kb)

共享内存 这个是指可以和其它进程共享的内存大小


知识补充:

Cached is the size of the Linux page cache, minus the memory in the swap cache, which is represented by SwapCached (thus the total page cache size is Cached + SwapCached). Linux performs all file I/O through the page cache. Writes are implemented as simply marking as dirty the corresponding pages in the page cache; the flusher threads then periodically write back to disk any dirty pages. Reads are implemented by returning the data from the page cache; if the data is not yet in the cache, it is first populated. On a modern Linux system, Cached can easily be several gigabytes. It will shrink only in response to memory pressure. The system will purge the page cache along with swapping data out to disk to make available more memory as needed.


Buffers are in-memory block I/O buffers. They are relatively short-lived. Prior to Linux kernel version 2.4, Linux had separate page and buffer caches. Since 2.4, the page and buffer cache are unified and Buffers is raw disk blocks not represented in the page cache—i.e., not file data. The Buffers metric is thus of minimal importance. On most systems, Buffers is often only tens of megabytes.
阅读(2312) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~