Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Clearing cached memory on linux

Posted on 2009-06-29
5
Medium Priority
?
2,213 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 750 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

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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é.
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

670 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