Freeing up RAM in Linux

NOTE: Little clarification, this is not needed at all ,as memory is freed when required.

WHY IT MAY BE HELP-FULL: This clears the page-cache , dentires and inodes.

IT’S TRANSLATION : It may be that you are watching a movie or using a Virtual Machine , a resource hungry process has filled up your ram by caching data and the data needs to be continuously removed  to make space for new data . This is managed by the kernel.

IF YOU STILL DON’T  GET IT: Notice  video in your movie hanging (not audio) while your ram gets cached Or your system running a bit slow ?


1) Stop the process consuming loads of memory. (Check System Monitor).
2) Open a terminal with root privileges .
3) Sync
4) echo 3 > /proc/sys/vm/drop_caches
5) echo 0 > /proc/sys/vm/drop_caches

Advertisements
  1. djays
    July 27, 2009 at 11:05 am

    PS: I am keeping this post short and non technical (Any recommendations regarding the post are appreciated )

  2. July 27, 2009 at 12:10 pm

    Will it be helpful in deallocating the already in use memory and cache coz linux starts lagging after an an hour or two of running and it takes up all available memory and cache. (system monitor still shows that only 25% of RAM is being used though)

    • djays
      July 27, 2009 at 2:35 pm

      Definitely , you can also make a shell script to do clean up after 2 hours.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: