Solved

Clearing cached memory on linux

Posted on 2009-06-29
5
2,006 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

862 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

25 Experts available now in Live!

Get 1:1 Help Now