Solved

Clearing cached memory on linux

Posted on 2009-06-29
5
2,110 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_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

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…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

696 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