LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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-27-2013, 03:07 AM   #1
deepak_message
Member
 
Registered: Oct 2007
Posts: 175

Rep: Reputation: 17
How to Clear buffer/cache memory


Hi,

I have redhat 5.3 64bit. it has kernel 2.6.18-308.13.1.el5.

it has showing all memory used in chache.
[abc]$ free -m
total used free shared buffers cached
Mem: 24103 23965 137 0 16 2641
-/+ buffers/cache: 21308 2794
Swap: 8001 4176 3824

.

please help me to get the memory in use.
 
Old 01-27-2013, 03:18 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
it IS "in use". If running applications need the space, they'll reclaim it. There is nothing to do.

you CAN do what you asked ... "sysctrl -w vm.drop_caches=3" BUT if you don't actually understand this already, don't do it. In a similar vein you can lower the "swappiness" value but these things work as they do by default for a reason, and most people have no valid reason to change them, including, I suspect, you.
 
Old 01-27-2013, 05:50 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Wellll ...
Looking at that, out of 24 Gig RAM, more than 88% is in use (i.e. not buffer/cache).
Maybe the OP has a reasonable request - what's using it.

What does "top" show for a start ?.
 
Old 01-28-2013, 03:00 AM   #4
deepak_message
Member
 
Registered: Oct 2007
Posts: 175

Original Poster
Rep: Reputation: 17
Top output is normal...

top - 13:13:12 up 5 days, 14:27, 2 users, load average: 2.45, 1.55, 1.01
Tasks: 461 total, 2 running, 459 sleeping, 0 stopped, 0 zombie
Cpu(s): 5.1%us, 0.4%sy, 0.0%ni, 92.0%id, 2.4%wa, 0.0%hi, 0.1%si, 0.0%st
Mem: 24681492k total, 24582896k used, 98596k free, 15576k buffers
Swap: 8193140k total, 4787228k used, 3405912k free, 2882564k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
11724 oracle 18 0 3380m 105m 35m R 81.9 0.4 0:27.65 oracle
5489 oracle 16 0 3316m 17m 16m S 3.3 0.1 2:02.03 oracle
28181 oracle 18 0 3316m 10m 6972 S 2.3 0.0 27:07.90 oracle
18859 oracle 18 0 4348m 62m 53m S 0.7 0.3 32:48.52 oracle


Acid--- Can I use this command on running server without downtime?
 
Old 01-29-2013, 07:54 AM   #5
deepak_message
Member
 
Registered: Oct 2007
Posts: 175

Original Poster
Rep: Reputation: 17
Please reply.
 
Old 01-29-2013, 07:56 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
dropping caches shouldn't incur downtime, but from personal experience I've known it lock a box up on at least one occasion.
 
  


Reply



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
[SOLVED] Cache memory clear snjksh Linux - Server 5 03-10-2014 07:52 AM
Difference between page cache and buffer cache Nayaka Linux - Kernel 5 09-28-2011 08:23 AM
Linux Memory Management - Buffer Cache brian_p_sully Linux - General 16 01-10-2010 11:20 PM
How to clear cache memory in RHEL4? tcegrid Linux - Newbie 6 10-20-2008 06:38 PM
How do I clear the memory cache on my linux server? robgo777 Linux - Software 2 01-09-2005 01:30 AM

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

All times are GMT -5. The time now is 09:18 AM.

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