Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Aug 1998 04:37:45 +1200 (NZST)
From:      Andrew McNaughton <andrew@squiz.co.nz>
To:        Eddie Fry <eddie@eaznet.com>
Cc:        isp@FreeBSD.ORG
Subject:   Re: email & web slow
Message-ID:  <Pine.BSF.3.96.980819041856.8497L-100000@aniwa.sky>
In-Reply-To: <35D9F830.C0A41637@eaznet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 18 Aug 1998, Eddie Fry wrote:

> When our dial up service gets busy, qpopper and Apache tend to slow down
> noticably.  I've checked things out with TOP and the CPU stays over 90%
> idle even during peak times.  Would adding another NIC and moving mail
> to that interface help speed things up?  I'm not real certain where the
> bottleneck lies.  The console seems to run fine and disk activity isn't
> overabundant.  Any ideas?  We're running 10baseT at the moment  but our
> collision rates don't seem high.  Our PM3 reports the following:

I don't know much about qpopper, but have been working on improving
Apache's performance over the last few days.

The httpd seems to be light on cpu, and I expect a disk bottleneck to kick
in before I get close to a CPU bottleneck. 

The biggest win for me was finding the limit on the maximum number of
child processes the httpd and children could spawn (the limit check is
based on the number of processes currently running under the same UID, not
the number of actual child processes, although the size of the limit is
passed to children across suid boundaries).

To check your current limit, run a cgi like so:

-------------
#!/bin/sh
echo Content-Type: text/plain
echo
limits
-------------

You'll get something like  this back:

Resource limits (current):
  cputime          infinity secs
  filesize         infinity kb
  datasize-cur        16384 kb
  stacksize-cur        8192 kb
  coredumpsize     infinity kb
  memoryuse-cur       30720 kb
  memorylocked-cur    10240 kb
  maxprocesses-cur       64
  openfiles-cur          64


These values are dependent on the maxuser setting in your kernel.

I haven't yet rebuiilt the kernel, but putting "ulimit -S -u 256" in my
apachectl script just before starting the httpd seems to work ok.

This doesn't effect other processes running under the  same UID though,
which for me affects mostly cron jobs.  In some cases I've put the ulimit
command into the cron job as well, and in others I'm happy to have them
fail when the server is running hot.

Most of the time the server runs only 15 or so httpd processes, but every
so often it'll get busy doing something, and a couple of hundred httpd's
appear. 



Andrew McNaughton


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980819041856.8497L-100000>