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

下面是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

1同行回答

yangjianxvyangjianxv  部门总经理 , 成方金融科技有限公司
aix  系统进程lrud会干这个事。没有必要人工干预。如果一定要人工干预,可以试试sync(),它可以把dirty page flush到磁盘。但不确定非计算内存的分页是否会从内存里释放。显示全部

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

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

收起
银行 · 2017-03-10
浏览2543

提问者

overtop
系统工程师互联网公司
擅长领域: 服务器存储系统管理

问题来自

相关问题

相关资料

相关文章

问题状态

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