gabriel wrote:
i've been trying to determine where the problem's coming from, not wanting to look at the kernel 'cause well... i don't know how to fix that. but i can't avoid it. my router is a k6-II running gentoo-sources, iptables, sshd and that's it. and here's the output of free:

# free
             total       used       free     shared    buffers     cached
Mem:         25992      25492        500          0        176       3396
-/+ buffers/cache:      21920       4072
Swap:       136544       1684     134860

now i understand that linux likes to use all of my ram, but caches most of it, so the "free" column should be rather low, but 500bytes? and where's all the rest of my ram gone? the box doesn't do anything other than route packets!

The key to your answer is the buffers/cache line :)


Linux runs a system where (current me if i'm wrong) things like recently access files are stored in the memory to help concurrent access. However, this memory isn't 'used' in the normal sense - if needed it will overwrite it all for use by a running program that needs it.

Taking your router, of the 25492kb used, 3572kb are buffers/cache, leaving you with 21920kb used and (when needed) 4072kb.

free
             total       used       free     shared    buffers     cached
Mem:        256580     252904       3676          0      25148      55208
-/+ buffers/cache:     172548      84032
Swap:       530136       3720     526416

Same for your web/file server - only 172548kb are used (84032kb are avaliable when needed).


My file/webserver, running ssh, rsync, postgresql, mysql, uw-imap, postfix/procmail, spamd, samba, fcron, bind and dhcpd has:

# file
             total       used       free     shared    buffers    cached
Mem:        125896     123300       2596          0      10880     43916
-/+ buffers/cache:      68504      57392
Swap:       250480     110864     139616

So, it's only using 68504kb of mem (although 110864 are in swap, 'cause it's been up for so long) - i've got 57392kb avaliable if i need it :)

--
jonathan wright                          mail at djnauk.co.uk
--
life has no meaning unless we can enjoy what we've been given
--
                   all new and improving ... www.djnauk.co.uk

--
[EMAIL PROTECTED] mailing list



Reply via email to