LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Memory Usage at 98%

[ILUG] Memory Usage at 98%

Gareth Eason bigbro at skynet.ie
Thu Aug 4 10:24:07 IST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Colin O'Keeffe wrote:
| HI
|
| Looking at phpsysinfo, my memory usuage ( have 1 gig of ram ) is at
| 98% and holding there constantly
[munch...]

	Depending on what memory usage figure you're looking at, it could be
exactly right. Linux uses a lazy memory recovery algorithm - it assumes
RAM usage is cheap (in computing terms) compared to hard disk access, so
it tries to cache as much hard disk data as possible in RAM. If you use
`free` you should see a number of figures. `vmstat` gives more. `top`
shows the same useful memory information in a slightly different format
again.

	Basically (vastly simplified - Mel Gorman would be able to comment on
the specifics of this) the kernel, or rather the memory management
subsystem, will try and keep a small amount of memory free so that new
requests for memory can be satisfied quickly. About 2% of memory sounds
right to me. Everything else will be used for active processes, inactive
processes not yet paged to disk (paging to disk is expensive, so Linux
will try not to do it unless it needs to, even though the process is
inactive. Remember - the kernel doesn't know how soon you are going to
make the process active again - it might be in the next second, or it
might not be for a week (or months, in my case :-)  )) and disk / I/O
cache memory. On my 1.5GB machine I generally reach a quiescent state
where about 9MB is free, and the rest is split about 2:1 between disk
cache (~900MB) and process memory (~600MB) (the machine does a lot of
disk I/O for both itself and other machines on my HAN, which explains
the rather high disk-cache percentage.)

	Hope this helps and explains things somewhat. You can get much more
information from `man vmstat` and `man free`

	If you're worried something is wrong, check what the memory use is
classed as, and if it's not cache it might be worth your while looking
into things a little bit more extensively. Remember that MySQL and
Apache are both demons for caching stuff for fast response (it's much
quicker to get stuff from RAM than from disk) too, so if you have some
large data-sets in MySQL or are getting lots of hits for stuff in
Apache, it's possible they are sucking up RAM to try and optimise their
reply-rates too.

	Best regards,
	-->Gar
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFC8d62K36C50PvIR8RAstnAJwNHNrdhHGu/V+JOSpv4zqyaqikdQCfSy5/
juvCS5hcJ2Kj4w9tv/jpO6Y=
=XOua
-----END PGP SIGNATURE-----




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell