Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 May 2006 20:43:26 -0500
From:      Jonathan Horne <jhorne@dfwlp.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: memory usage
Message-ID:  <200605072043.26550.jhorne@dfwlp.com>
In-Reply-To: <1147049020.6775.19.camel@genius.i.cz>
References:  <200605071209.15390.jhorne@dfwlp.com> <200605071219.41408.jhorne@dfwlp.com> <1147049020.6775.19.camel@genius.i.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 07 May 2006 19:43, Michal Mertl wrote:
> 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

well, i guess my system's top confirms what you say:

Swap: 4071M Total, 4071M Free

and, i wasnt experiencing any lack in performance, i was just curious.  but i 
admit that i must be forgiven for almost doubting!

thanks again,
jonathan



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