Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-19-2004, 06:36 PM
|
#1
|
LQ Newbie
Registered: Aug 2003
Posts: 19
Rep:
|
How much memory is really 'free'?
Hi all,
Here's a typical sample of what I get when I run 'free':
total used free shared buffers cached
Mem: 1015300 989884 25416 0 71988 780236
-/+ buffers/cache: 137660 877640
Swap: 2104504 0 2104504
I'd really appreciate it if someone would explain to me what is meant by 'buffers' and 'cached', how much memory is *really* left for me to use, and most importantly, whether I should be worried that I appear to be using 99% of available memory!
Thanks in advance,
Rob
|
|
|
09-19-2004, 06:43 PM
|
#2
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313
Rep:
|
free -m will give you the values in Mb which might be usefull.
Buffers and cache, are used by Linux to keep things efficent, but may have nothing in them that you can't lose, so you can usually deduct that from the actual memory used. The Cache and buffers, will decrease as other things demand memory.
You haven't touched swap, so obviously your doing nothing that demands more memory than you have.
Buffers: are used for accessing things, like disks and networks.
Cache: things you've recently accessed or might potentially access, so Linux won't have to go get them of the disk again.
Last edited by leonscape; 09-19-2004 at 06:45 PM.
|
|
|
09-19-2004, 06:57 PM
|
#3
|
LQ Newbie
Registered: Aug 2003
Posts: 19
Original Poster
Rep:
|
Hi leonscape,
Thanks for your reply.
So in theory, I've got a good 850MB to grow into?
Surely though, it's allocated to buffers and cache for a reason - if I eat into it with more httpd and mysql processes, will performance suffer?
How far would I have to go 'til I touched swap? Clearly something I don't want to happen.
Thanks,
Rob
|
|
|
09-19-2004, 07:02 PM
|
#4
|
Senior Member
Registered: Jun 2004
Posts: 2,553
Rep:
|
i think personally you are looking at the situation in an old way..
all memory in linux is virtual and all 100% is available (accept what's used for the memory map itself) for use by every running proccess.
the only thing you need to think about is swap used = 0.
therefore you system is not meeting any of the watermarks for being low on memory pages per zone
that cause swapping.....
the buffers section is ram that is mapped to the hard drive for faster reads and writes
the cache are loaded pages that aren't currently in use but are there for instant access should they be needed.
i guess from a traditional standpoint you should consider buffers and cache free memory
but like i said earlier ALL memory is free memory and nothing is loaded into memory at all.
|
|
|
09-19-2004, 07:05 PM
|
#5
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313
Rep:
|
That a difficult question to answer, it depends on how much stuff your really throwing at it. I mean how longs a piece of string?
Linux will try to give you the best performance it can, of course the bigger your cache, and buffers the better performance ( Although its a deminishing returns thing ). So it makes it as big as possible. So if you add more memory the bigger they'll get.
As soon as you start to do more they'll get smaller, once they get too small or something demands even more you'll start to hit swap, which is very slow.
|
|
|
All times are GMT -5. The time now is 11:23 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|