vmstat显示的buffer和cache的区别

 

  Try the manual first.
  $ man vmstat
   ...
   Memory
       swpd: the amount of virtual memory used (kB).
       free: the amount of idle memory (kB).
       buff: the amount of memory used as buffers (kB).
       [红帽子8.0的Man中没有这一行]
       cache: the amount of memory used as cache.
    ...
 
  See what's on my Red Hat Linux server.
  $ vmstat
   procs                      memory    swap          io     system         cpu
 r  b  w   swpd   free   buff  cache  si  so    bi    bo   in    cs  us  sy  id
 0  0  0      0 316488 159612 493916   0   0     0     6   22    23  13   2  14
 
Answers Googled:
  To answer your question, buffers are only used for file metadata (inodes, etc) and data from raw block devices. It's accessed via block device and block number.
  Cache has file data blocks, and memory mapped information (i.e. files mapped with mmap() calls). It's accessed primarily via inode number.
  So, the main difference would be scope, I guess. One's more concerened with blocks on a device, the other with information in a file.
  Either buffer can flush to disk, however. The buffer to the device file and the cache through the file system layer to the block device.   
 
参考资料:
    or buy Chinese edition from  china-pub.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值