Re: memory usage



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
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: [opensuse] openSUSE and Tasks
    ... Yes, I also open a lot of apps in windows, too, but it is a nuisance to have them all on the same desktop. ... 2G swap in use. ... having swap in use when there is free memory is a good thing. ...
    (SuSE)
  • Re: Inactive memory
    ... inactive and suddenly everything is coming out of swap. ... I'd just like to know that my machine is going to use the memory efficiently. ... >> So now I understand that it's alright for the free memory to be low. ... > [The VM pager uses LRU or actually NFU page selection algorithms with complex ...
    (freebsd-questions)
  • Re: 2.6.1: kernel BUG at mm/swapfile.c:806
    ... >>blocks managed by swapd ... it checks the remaining free memory every n seconds and creates ... as much swap space (virtual memory) as is required at a particular time by ... dynamicly creating swap files. ...
    (Linux-Kernel)
  • Heavy swap
    ... utilization of application server is very high. ... Vmstat shows 5.5 Gb free memory and at the same time it is ... showing only 3GB is free in swap. ...
    (SunManagers)
  • Re: RFT: updatedb "morning after" problem [was: Re: -mm merge plans for 2.6.23]
    ... memory freed it so there is free memory that could be filled with data ... in some other situations swap prefetch cannot help becouse useless data is getting cached at the expense of useful data. ... the design is to use CPU and I/O capacity that's otherwise idle to fill free memory with data from swap. ... Upon completion, it actually frees enough memory that swap-prefetch _could_ help on some boxes, while the real issue is that they should first and foremost dump GNU locate. ...
    (Linux-Kernel)