背景:服务器运行过程中发现内存不够用,缓存的又太多

现象:

centos7 清理缓存(buff/cache)

 

 解决办法:

1、同步数据到磁盘

[root@localhost ~]# sync

2、根据需求清除对应缓存

[root@localhost ~]# echo 3 > /proc/sys/vm/drop_caches
参数说明:
0 //默认是0; 1-清空页缓存; 2-清空inode和目录树缓存; 3-清空所有缓存

3、再次查看

centos7 清理缓存(buff/cache)

 

相关文章:

  • 2022-01-28
  • 2022-12-23
  • 2021-12-21
  • 2021-06-11
  • 2022-12-23
  • 2022-01-20
猜你喜欢
  • 2022-12-23
  • 2021-06-09
  • 2021-06-15
  • 2022-12-23
  • 2021-12-03
  • 2021-11-11
  • 2022-12-23
相关资源
相似解决方案