LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-11-2010, 03:14 AM   #1
snjksh
Member
 
Registered: Jan 2008
Location: Pune, India
Distribution: RHEL
Posts: 34

Rep: Reputation: 0
Cache memory clear


Please let me know how to clear cache memory ( RHEL 5.1 ) as it consumes almost 100% physical memory.

Regards,
snj.
 
Old 01-11-2010, 03:29 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,587

Rep: Reputation: 3507Reputation: 3507Reputation: 3507Reputation: 3507Reputation: 3507Reputation: 3507Reputation: 3507Reputation: 3507Reputation: 3507Reputation: 3507Reputation: 3507
Go here and learn.
 
Old 01-11-2010, 08:33 AM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194Reputation: 1194
Quote:
Originally Posted by syg00 View Post
Go here and learn.
That is a very nice presentation. The main point "Don't Panic! Your ram is fine!" is absolutely correct.

The info there is a bit over simplified (especially regarding the interaction with swapping). That simplification may be best for the beginners who tend to get worried about this issue. But I'm not sure.

To the OP: You can easily clear the Linux cache. The correct command is trivial to find in a simple search with google or here at LQ.

If you want to clear the cache to make results in some benchmark more reproducible, that is a valid purpose and worth knowing the command.

If you want to clear the cache to free up memory to get better performance, you are flat out wrong.
 
Old 01-13-2010, 02:23 AM   #4
kutty_prasad
Member
 
Registered: Sep 2006
Location: Bangalore,India
Distribution: RHEL,Fedora, CentOS, Slackware 12 & wrestling with LFS
Posts: 86

Rep: Reputation: 16
As root, run the following

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

But as sysg00 and johnsfine said, decide if you really want to clear the cache (for some weird reason, which I do sometimes).

More info at http://www.linuxinsight.com/proc_sys...op_caches.html
 
Old 07-27-2013, 10:34 AM   #5
snjksh
Member
 
Registered: Jan 2008
Location: Pune, India
Distribution: RHEL
Posts: 34

Original Poster
Rep: Reputation: 0
Thanks.
 
Old 03-10-2014, 07:52 AM   #6
manglesh.vyas
LQ Newbie
 
Registered: Sep 2010
Posts: 5

Rep: Reputation: 0
Thanks

Nice post, it Has clear all my doubts

Thanks

Manglesh
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Clear cache if not root mark_l Linux - General 15 05-26-2009 02:52 AM
How to clear cache memory in RHEL4? tcegrid Linux - Newbie 6 10-20-2008 06:38 PM
how do you clear the cache? eagletalontim Linux - Newbie 11 01-11-2006 03:05 PM
How do I clear the memory cache on my linux server? robgo777 Linux - Software 2 01-09-2005 01:30 AM
Clear cache raysr Linux - Newbie 2 03-26-2004 01:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration