Solved

Clearing cached memory on linux

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

680 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