How to release the Linux disk buffer/cache

Inorder to free the disk cache we get an interface /proc/sys/vm/drop_caches has been available to simplify this process.

First we run the sync command before dropping the cache. Doing this will ensure that all memory in the cache is updated and all dirty pages are synchronized before dropping the cache.

You can safely skip this step but if you have any dirty pages in your disk cache the system will refuse to release them.

# sync

next step is echoing “3″ to the /proc/sys/vm/drop_caches file which will signal the OS to release the pagecache, dentries and inodes.

# echo 3 > /proc/sys/vm/drop_caches

# sync

# echo 0 > /proc/sys/vm/drop_caches ----- default value/ after clear the cache make it as 0 by running this command.

# echo 1 > /proc/sys/vm/drop_caches ---- only page cache

# echo 2 > /proc/sys/vm/drop_caches ------ only inode 

# echo 3 > /proc/sys/vm/drop_caches --- inode/page cache/clear all cache

Terima kasih telah membaca artikel tentang How to release the Linux disk buffer/cache di blog Tutorial Opensource and Linux jika anda ingin menyebar luaskan artikel ini di mohon untuk mencantumkan link sebagai Sumbernya, dan bila artikel ini bermanfaat silakan bookmark halaman ini di web browser anda, dengan cara menekan Ctrl + D pada tombol keyboard anda.

Artikel terbaru :

  • How To Install Cinnamon In Ubuntu 14.04
  • How To Install Mate Desktop In Ubuntu 14.04
  • Creating the first Windows Server 2003 Domain Controller in a domain
  • How To Install Ubuntu 13.10 Server
  • How to Install Nuvola Player in Ubuntu
  • How to establish Emerald in Ubuntu 13.10 & Linux Mint 16
  • How to Restoring iptables Automatically On Boot on Debian and Ubuntu
  • How to Compile FFMPEG with H.264 and LAME in Ubuntu And Debian
  • How to Install Linux on a Playstation 2
  • apt-fast: Improve apt-get Download Speed
  • Artikel terkait :