The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux
.
google unix.com



Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to find Total and Free Physical Memory and Logical Memory in SOLARIS 9 0ktalmagik SUN Solaris 4 02-03-2009 09:37 AM
Free Memory in aix manoj.solaris AIX 11 01-04-2009 03:29 PM
Free Memory manoj.solaris AIX 1 10-12-2007 11:48 AM
Determining free(available) memory in MV linux trancedeejay High Level Programming 11 02-20-2006 04:56 AM
How to free the memory? jazz High Level Programming 3 11-03-2005 03:45 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-29-2008
Neo's Avatar
Neo Neo is online now Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,662
Free Linux Memory by Dropping Caches

Linux Kernels 2.6.16 and up provide a way to instruct the kernel to drop the page cache, inode and dentry caches on command. This tip can help free Linux memory without a reboot.

Note: This is a non-destructive operation. Dirty objects are not freeable, hence; you must run sync beforehand.

To use /proc/sys/vm/drop_caches, you simply echo a number to it.

To free pagecache:

Code:
# sync; echo 1 > /proc/sys/vm/drop_caches
To free dentries and inodes:

Code:
# sync; echo 2 > /proc/sys/vm/drop_caches
To free pagecache, dentries and inodes:
Code:
# sync; echo 3 > /proc/sys/vm/drop_caches
Closed Thread

Bookmarks

Tags
drop_caches, linux, memory, proc filesystem

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:27 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0