Linux释放cache语句与aix是否通用,安全性如何?

下面是linux上的解释,不知道aix是否可以用类似方法,手工释放disk cache(echo 3 > /proc/sys/vm/drop_caches)Clearing the disk cacheFor experimentation, it's very convenient to be able to drop the disk cache. For this, we can use the special file /proc/sys/vm/dr... 显示全部

下面是linux上的解释,不知道aix是否可以用类似方法,手工释放disk cache(echo 3 > /proc/sys/vm/drop_caches)

Clearing the disk cache

For experimentation, it's very convenient to be able to drop the disk cache. For this, we can use the special file /proc/sys/vm/drop_caches. By writing 3 to it, we can clear most of the disk cache:

$ free -m             total       used       free     shared    buffers     cachedMem:          1504       1471         33          0         36        801-/+ buffers/cache:        633        871Swap:         2047          6       2041$ echo 3 | sudo tee /proc/sys/vm/drop_caches 3$ free -m             total       used       free     shared    buffers     cachedMem:          1504        763        741          0          0        134-/+ buffers/cache:        629        875Swap:         2047          6       2041

Notice how "buffers" and "cached" went down, free mem went up, and free+buffers/cache stayed the same.

收起
参与6

返回yangjianxv 的回答

yangjianxv yangjianxv 部门总经理 成方金融科技有限公司

aix  系统进程lrud会干这个事。没有必要人工干预。

如果一定要人工干预,可以试试sync(),它可以把dirty page flush到磁盘。但不确定非计算内存的分页是否会从内存里释放。

银行 · 2017-03-10
浏览2625

回答者

yangjianxv
yangjianxv 0 0 7
部门总经理 成方金融科技有限公司
擅长领域: 服务器中间件数据库
评论383

yangjianxv 最近回答过的问题

回答状态

  • 发布时间:2017-03-10
  • 关注会员:2 人
  • 回答浏览:2625
  • X社区推广