LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 04: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, 04:18 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
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, 06:50 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,477

Rep: Reputation: 3093Reputation: 3093Reputation: 3093Reputation: 3093Reputation: 3093Reputation: 3093Reputation: 3093Reputation: 3093Reputation: 3093Reputation: 3093Reputation: 3093
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, 04: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, 08:54 AM   #5
deepak_message
Member
 
Registered: Oct 2007
Posts: 175

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

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


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

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

All times are GMT -5. The time now is 12:39 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration