Running out of memory

Jacob S stormspotter at 6Texans.net
Thu May 5 14:08:04 PDT 2005


On Thu, 5 May 2005 13:33:04 -0500
"Andrew L. Gould" <algould at datawok.com> wrote:

> On Thursday 05 May 2005 09:59 am, Jacob S wrote:
> > I've got a server that keeps running out of memory and crashing. It
> > has 1GB of swap and 1GB of ram. I originally made the swap the same
> > size as the ram, as my previous experience with *nix machines was
> > that when swap is double the size of ram, the computer is almost
> > totally unuseable for at least 30 minutes whenever the computer
> > needs to clean out swap.
> >
> > Has anyone else seen this problem, or is it safe for me to add
> > another GB of swap?
> >
> > Also, I made the mistake of partitioning all the space on the hard
> > drive, with only 1GB set aside for swap. How big of a performance
> > hit would it be to use a swap file instead of a swap partition? Is
> > there an easy (and safe!) way to resize partitions so that I could
> > add in a second swap partition?
> 
> What is it that you're doing that would use up so much RAM and swap?  
> Was the high swap usage expected?

This server's hosting about 250 websites - the majority being poorly
written php, and incoming e-mail for those domains. It has cPanel
installed, so incoming e-mail goes through exim, spamassassin and
clamav, but outgoing uses qmail and qmqp to let another server do the
hard(er) delivery work. It stays busy enough to keep a 2Mbps connection
close to its limit and Apache is usually pretty close to its 375 client
limit.

The server is a 2.8Ghz Xeon running FreeBSD 5.3. The load is not totally
unexpected, as we have been watching the load increase as more sites
were added. We will probably end up dumping another GB of ram on it
before long.

Thanks,
Jacob


More information about the freebsd-questions mailing list