Solved

Clearing cached memory on linux

Posted on 2009-06-29
5
1,986 Views
Last Modified: 2012-05-07
Hello i want to clear cached memory on Red Hat Enterprise Linux AS release 3 (Taroon)
echo 3 > /proc/sys/vm/drop_caches - doesnt work.
uname -a
Linux ivision 2.4.21-4.ELsmp #1 SMP Fri Oct 3 17:52:56 EDT 2003 i686 i686 i386 GNU/Linux

have u any advice for me?
0
Comment
Question by:_Amanat_
  • 3
  • 2
5 Comments
 
LVL 3

Expert Comment

by:astroviper
ID: 24742378
You are running that as superuser/root user right?
0
 

Author Comment

by:_Amanat_
ID: 24742383
yes
0
 
LVL 3

Expert Comment

by:astroviper
ID: 24742387
http://www.linuxinsight.com/proc_sys_vm_drop_caches.html

To free pagecache, dentries and inodes: echo 3 > /proc/sys/vm/drop_caches
 
As this is a non-destructive operation, and dirty objects are not freeable, the user should run "sync" first in order to make sure all cached objects are freed.

Try the following as superuser:

sync; echo 3 > /proc/sys/vm/drop_caches

Open in new window

0
 

Author Comment

by:_Amanat_
ID: 24742408
echo 1 > /proc/sys/vm/drop_caches
-bash: /proc/sys/vm/drop_caches: No such file or directory
[root@ivision root]#
0
 
LVL 3

Accepted Solution

by:
astroviper earned 250 total points
ID: 24742453
Ah okay, its a just Red Hat thing. From what I'm reading though is there any real need to clear it?

From: How to find the actual memory usage on Redhat Linux
"The answer is simple - linux kernel takes *all* RAM for bufferes/cache, but release it if some applications ask for memory."

"Yes, that is right, Linux will try to use 100% of memory always, if not used by programs, will be used as buffer/cache.
Use the "free" command to identify the memory used by programs and as buffer/cache. The values under +/- buffers/cache gives you the real memory usage."

Memory Utilisation on Red Hat Enterprise linux

This question seems to have been asked around a few times and the consensus reply seems to be "oh, but you don't need to."
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now