Tony's Blog

Linux/Ubuntu 内存无故占用过高的解决办法

查看内存占用情况:

  1. cat /proc/meminfo

释放命令如下:

  1. # sudo 权限
  2. # To free pagecache:
  3. sudo sh -c "sync && echo 1 > /proc/sys/vm/drop_caches;";
  4. # To free dentries and inodes:
  5. sudo sh -c "sync && echo 2 > /proc/sys/vm/drop_caches;";
  6. # To free pagecache, dentries and inodes:
  7. sudo sh -c "sync && echo 3 > /proc/sys/vm/drop_caches;";