Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 May 2006 02:43:40 +0200
From:      Michal Mertl <michal.mertl@i.cz>
To:        Jonathan Horne <jhorne@dfwlp.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: memory usage
Message-ID:  <1147049020.6775.19.camel@genius.i.cz>
In-Reply-To: <200605071219.41408.jhorne@dfwlp.com>
References:  <200605071209.15390.jhorne@dfwlp.com> <200605071219.41408.jhorne@dfwlp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Jonathan Horne wrote:
> On Sunday 07 May 2006 12:09, Jonathan Horne wrote:
> > i have a server that has 2GB ram, recently upgraded from 1GB ram.  it runs
> > apache2.0 with php5, sendmail with spamass-milter, dovecot, mysql5.0,
> > cacti, and a couple other small things (like snmp, my bx irc shell, etc).
> >
> > when ever i look at the memory usage (via phpsysinfo, or cacti graphs), its
> > nearly always showing less than 100mb of ram available.  top shows several
> > perls (probably spamassassin), 8 or so httpds (typical), but that would
> > probably only account for (a liberal guess) 500-600 mb of ram.
> >
> > is there a good way to find out where this bottomless ram funnel leads to?
> > or, should this behavior just be considered typical?
> >
> > thanks,
> > jonathan
> 
> update...
> 
> i just upgraded to the new phpsysinfo rc2, and it shows more detailed 
> information about what the memory usage is doing.  it shows that 1.57GB is 
> being used by buffers.  what is the significance of 1.57GB of memory being 
> used by 'buffers'?

I would expect a question like this is somewhere in the FAQ.

It is typical that you only see a couple of hundred kilobytes of free
memory on a (at least a little used) FreeBSD system. The system
allocates  'physical' memory as needed (as long as there is some free)
and only when there is no free memory, it starts to reuse some of the
'almost' free memory. 'Almost' free memory is mainly disk cache (your
buffers).

This is nothing to worry about. You can see there is a memory shortage
when there is some swapping during normal workload (in top there appears
"kb in/out" on the swap line). It is neither anything to worry about
when you have some swap space used - FreeBSD is rather aggresively
copying parts of memory to swap when it feels to. As long as it doesn't
need to use the data in the swap often it's an optimization - even disk
cache is better usage of your memory then inactive parts of your
programs' memory.

Michal




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1147049020.6775.19.camel>