• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 關于釋放linux虛擬內存

    發表于:2011-05-09來源:不詳作者:領測軟件測試網采編點擊數: 標簽:
    原因分析: Linux下頻繁讀取文件后,物理內存會很快耗盡.當程序結束時,內存不會被正常釋放,而是一直作為caching.這是linux為了提高磁盤的讀取效率而做的設計. 解決方法: 1. linux-sudv:~ #sync sync命令以確保文件系統的完整性。它將所有未寫的系統緩沖區寫到

      原因分析:

      Linux下頻繁讀取文件后,物理內存會很快耗盡.當程序結束時,內存不會被正常釋放,而是一直作為caching.這是linux為了提高磁盤的讀取效率而做的設計.

      解決方法:

      1. linux-sudv:~ #sync

      sync命令以確保文件系統的完整性。它將所有未寫的系統緩沖區寫到磁盤中.包括pagecache,dentries and inodes.

      2. linux-sudv:~ #echo 3 > /proc/sys/vm/drop_caches

      將drop_caches的值設為3.(該值默認為0,可修改為1,2,3,詳見資料引用)

      資料引用:

      /proc/sys/vm/drop_caches(since Linux 2.6.16)

      Writing to this file causes the kernel to drop clean caches,

      dentries and inodes from memory, causing that memory to become

      free.

      To free pagecache, use echo 1 > /proc/sys/vm/drop_caches; to

      free dentries and inodes, use echo 2 > /proc/sys/vm/drop_caches;

      to free pagecache, dentries and inodes, use echo 3 >

      /proc/sys/vm/drop_caches.

      Because this is a non-destructive operation and dirty objects

      are not freeable, the user should run sync first. 

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>