`
tcpdump
  • 浏览: 19820 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

linux下清空磁盘缓存

阅读更多
测试程序性能的时候,之前的时候需要不停的重启机器来进行测试,比较麻烦,想有什么办法可以清空磁盘缓存呢?

If you're on OS X, the 'purge' command (part of the CHUD developer tools) will cause the disk caches to be purged. On Linux, with a 2.6.16 kernel or newer, 'echo 3 > /proc/sys/vm/drop_caches' will achieve the same effect. Another trick on Linux is to use a separate filesystem for the benchmark--if you perform a umount/mount cycle
after each run the kernel will drop any cach……
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics