Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 22nd April 2009, 02:22 PM
abhayrathod Offline
Registered User
 
Join Date: Dec 2008
Posts: 3
fedora 9 is caching too much memory

Hi

I am having fedora 9 installed with RAM of 2 gigs. I have Vmserver installed on it and am running 1 Vm with 512 RAM allocated to it.

After powering ON the VM, total memory cached by fedora is 1283 Megs and free memory left is too less ~49 megs
---------------------------
# free -m
total used free shared buffers cached
Mem: 1981 1932 49 0 47 1283
-/+ buffers/cache: 601 1380
Swap: 1983 0 1983

---------------

Can any one please tell why fedora is caching so much of mem and how can we reduce it .

Thanks
__________________
-Abhay Rathod
Visit me at http://abhayrathod.com
Reply With Quote
  #2  
Old 22nd April 2009, 02:47 PM
markkuk Offline
Registered User
 
Join Date: Apr 2005
Location: Finland
Posts: 5,076
Unused memory is wasted memory. There's no problem with your memory use. If you start more programs that use more memory space, the amount used for caching will be reduced automatically.
Reply With Quote
  #3  
Old 22nd April 2009, 03:50 PM
nt4cats Offline
Registered User
 
Join Date: Aug 2005
Location: Philadelphia, PA
Posts: 99
Here is another way to look at it.

Consider the output from my machine:
Code:
[ddenardo@cylon ~]$ free -m
             total       used       free     shared    buffers     cached
Mem:          3964       3261        702          0         48       2158
-/+ buffers/cache:       1054       2909
Swap:         5951          0       5951
One line at a time (plus the header):
Code:
             total       used       free     shared    buffers     cached
Mem:          3964       3261        702          0         48       2158
I have 3964 megs of total RAM (~ 4Gigs), 3261M is "used", leaving 702M "free". The "shared" memory column is obsolete -- ignore it. The last two numbers say that I have 48M of kernel buffers, and 2158M of "Cached" stuff.

This looks like my RAM is more than 80% "full" (only 700M out of 4G of RAM is "free"). This isn't really true, and the next line explains that.

Code:
             total       used       free     shared    buffers     cached
-/+ buffers/cache:       1054       2909
That says that if you factor out the buffers and cache, I really have 1054M "used" and 2909M "free" -- so I'm really only using about 25% of my RAM at this point.

The last line (the one that starts with "Swap:") just shows the total amount of swap space available and the amount of swap space used.

... so you may wonder why the first line said that 80% of my RAM was being used? Well, the kernel realizes that I have gobs and gobs of unused RAM, so it does things like buffer disk reads -- which makes the computer faster. If an application needs that RAM that it is using for buffers, the kernel will discard the buffer and give the application the memory it asked for.

In your case, it looks like you only have 49M available, but in reality you have 1380M available.

Does that make sense?
Reply With Quote
  #4  
Old 22nd April 2009, 04:26 PM
abhayrathod Offline
Registered User
 
Join Date: Dec 2008
Posts: 3
Thanks for that detailed explanation.

That explains my doubt about cache memory.
__________________
-Abhay Rathod
Visit me at http://abhayrathod.com
Reply With Quote
  #5  
Old 22nd April 2009, 04:42 PM
sideways's Avatar
sideways Offline
Retired User
 
Join Date: Oct 2004
Location: London, UK
Posts: 4,999
you can (temporarily) empty the cache with (as root)

Code:
sync && echo 3 > /proc/sys/vm/drop_caches
But there is no point, as it will be automatically freed if required for a process, and it will quickly fill up again anyway.

http://linux-mm.org/Drop_Caches
Reply With Quote
Reply

Tags
fedora 9, vmware server

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP-Unable to install caching-nameserver using webmin on fedora box m4rkgh0st Using Fedora 13 19th March 2009 05:53 AM
Fedora 9 hi ram caching klingoncowboy4 Using Fedora 0 7th December 2008 01:50 AM


Current GMT-time: 15:50 (Friday, 24-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat