zoukankan      html  css  js  c++  java
  • 释放linux细碎的内存



    作者: Dssiuet  出自: http://www.linuxdiyf.com
    今日惊惶地发现,主节点上8G内存被不知道什么进程吃失了整整6G不足,正常的较量争论将近维持不下去了,遂处置之。

    先看看内存哄骗情况

    [root@node1 ~]# free -m
    total used free shared buffers cached
    Mem: 8004 6557 1446 0 163 5630
    -/ buffers/cache: 763 7240
    Swap: 1983 0 1983

    把内存里的数据暂时写到硬盘里

    [root@node1 ~]# sync

    编削 /proc/sys/vm/drop_caches文件

    [root@node1 ~]# echo 3 > /proc/sys/vm/drop_caches
    [root@node1 ~]# cat /proc/sys/vm/drop_caches

    再看内存

    [root@node1 ~]# free -m
    total used free shared buffers cached
    Mem: 8004 631 7372 0 0 60
    -/ buffers/cache: 570 7433
    Swap: 1983 0 1983

    终于释放出来了。




    版权声明: 原创作品,允许转载,转载时请务必以超链接方式标明文章 原始起因 、作者信息和本声明。不然将深究法律责任。

  • 相关阅读:
    NOI Online 2020 提高组游记
    【HDU5840】This world need more Zhu
    CSP-S 2019 AFO记
    防错笔记
    关于Blog
    题解 【UER #6】逃跑
    动态规划杂题选记
    有趣计数题选做
    题解 [POI2012] Leveling Ground
    xioa han 带画家!
  • 原文地址:https://www.cnblogs.com/zgqjymx/p/1973127.html
Copyright © 2011-2022 走看看