手動回收 Cached Memory

有下述兩種方式可以手動做回收記憶體:

  1. 參考此文: 回收 Linux cached memory

    echo 1 > /proc/sys/vm/drop_caches
    or
    sysctl -w vm.drop_caches=1

  2. 之前 AceLan 長輩指點的方式

    # And free up caches
    #
    echo Freeing the page cache:
    echo 1 > /proc/sys/vm/drop_caches
    echo Free dentries and inodes:
    echo 2 > /proc/sys/vm/drop_caches
    echo Free the page cache, dentries and the inodes:
    echo 3 > /proc/sys/vm/drop_caches

相關網頁

By tony

自由軟體愛好者~喜歡不斷的思考各種問題,有新的事物都會想去學習嘗試 做實驗並熱衷研究 沒有所謂頂天的技術 只有謙虛及不斷的學習 精進專業,本站主要以分享系統及網路相關知識、資源而建立。 Github http://stnet253.github.io

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料