LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 10-20-2008, 11:35 AM   #1
tcegrid
LQ Newbie
 
Registered: Apr 2007
Posts: 10

Rep: Reputation: 0
How to clear cache memory in RHEL4?


Hi All,
I am using RHEL4. When I give the free command. It gives following output.

total used free shared buffers cached
Mem: 32710352 6168032 26542320 0 144216 5464628
-/+ buffers/cache: 559188 32151164
Swap: 2040212 0 2040212

Here it seems cache memory occupies 5GB of memory.
Can anyone tell me how to clear this cache memory?

Regards,
Thamizh
 
Old 10-20-2008, 12:11 PM   #2
CRC123
Member
 
Registered: Aug 2008
Distribution: opensuse, RHEL
Posts: 374
Blog Entries: 1

Rep: Reputation: 31
Pretty much the same question asked here.

Don't worry about it.
 
Old 10-20-2008, 01:04 PM   #3
JSkywalker
Member
 
Registered: Aug 2007
Distribution: openSUSE 12.1
Posts: 96

Rep: Reputation: 24
my 'free' shows:
$ free
total used free shared buffers cached
Mem: 3974852 3909092 65760 0 115240 2278888
-/+ buffers/cache: 1514964 2459888
Swap: 4070544 128 4070416

What is the main purpose of your machine?
mine runs Apache/MySQL/Postfix

i wonder, why you cache is so much higher than mine...
 
Old 10-20-2008, 01:10 PM   #4
CRC123
Member
 
Registered: Aug 2008
Distribution: opensuse, RHEL
Posts: 374
Blog Entries: 1

Rep: Reputation: 31
Quote:
Originally Posted by JSkywalker View Post
my 'free' shows:
$ free
total used free shared buffers cached
Mem: 3974852 3909092 65760 0 115240 2278888
-/+ buffers/cache: 1514964 2459888
Swap: 4070544 128 4070416

What is the main purpose of your machine?
mine runs Apache/MySQL/Postfix

i wonder, why you cache is so much higher than mine...
Well first of all, he has close to 32GB of memory while you only have around 4GB but yet you are still 'using' more memory than he is.

I bet that the buffering/caching algorithm will allocate more buffer/cache memory the more RAM you have (it make's since at least).
 
Old 10-20-2008, 01:22 PM   #5
icorson
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Rep: Reputation: 0
Try this to clear cache.

sudo sync
sudo echo 3 | sudo tee /proc/sys/vm/drop_caches
 
Old 10-20-2008, 02:06 PM   #6
JSkywalker
Member
 
Registered: Aug 2007
Distribution: openSUSE 12.1
Posts: 96

Rep: Reputation: 24
Quote:
Originally Posted by CRC123 View Post
Well first of all, he has close to 32GB of memory
damn, i must have overlooked one digit...
 
Old 10-20-2008, 06:38 PM   #7
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5
Posts: 16,086

Rep: Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995
Frankly, I'd leave it alone. The kernel/scheduler knows what its doing. It will use all the memory it can find and shuffle things in/out on demand. There's no point in trying to do it manually.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory leak in RHEL4 in the page cache sree1972 Linux - Server 1 08-03-2007 09:23 PM
how to clear printer cache anindyanuri Linux - Software 2 11-29-2006 09:28 AM
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


All times are GMT -5. The time now is 09:03 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration