httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michele Petrovsky" <tp...@voicenet.com>
Subject Re: Server going Wild
Date Fri, 02 Aug 2002 19:43:04 GMT
Dave, you might also want to look into the command rtsched.  Don't know if
it's available under any OS other than HP-UX, but it does allow on-the-fly
changes of process priority *without* having to bother with nicing.

>
> Here is one starting (from top):
>
>   PID USERNAME PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
> 82353 nobody    55   0 37060K 25424K RUN      0:08 44.99% 30.76% httpd
> 81539 nobody     2   0 20852K 18060K sbwait   0:02  0.93%  0.93% httpd
> 82352 nobody     2   0 19992K 17308K sbwait   0:00  1.29%  0.88% httpd
> 82087 nobody     2   0 24308K 21676K sbwait   1:40  0.29%  0.29% httpd
> 81471 nobody     2   0 19992K 17448K accept   0:02  0.24%  0.24% httpd
> 82307 nobody     2   0 19992K 17296K accept   0:00  0.25%  0.24% httpd
> 81466 nobody     2   0 20416K 17900K sbwait   0:02  0.15%  0.15% httpd
> 81542 nobody     2   0 20420K 18000K sbwait   0:02  0.05%  0.05% httpd
>   109 root       2   0  6344K  2092K select   3:24  0.00%  0.00% perl
>  5914 root       2   0  1792K   516K select   1:11  0.00%  0.00% sendmail
>    82 root      10   0   992K   232K nanslp   0:11  0.00%  0.00% cron
> 79875 root      28   0  1992K  1020K RUN      0:06  0.00%  0.00% top
>    89 root       2   0   916K   108K select   0:05  0.00%  0.00% usbd
> 81467 nobody     2   0 21776K 19184K sbwait   0:05  0.00%  0.00% httpd
> 74400 root       2   0  2476K   984K select   0:04  0.00%  0.00% sshd
> 81472 nobody     2   0 21316K 18708K sbwait   0:03  0.00%  0.00% httpd
>
> Thank You!
> -------------------
>
> Dave Koch
>
> -----Original Message-----
> From: Michele Petrovsky [mailto:tpark@voicenet.com]
> Sent: Friday, August 02, 2002 12:41 PM
> To: users@httpd.apache.org
> Cc: rocque.m@gmc.edu; Tom Parkinson
> Subject: Re: Server going Wild
>
>
> If I'm not mistaken, the higher the integer value of a Unix/Linux
process's
> "nice number", the *lower* it is in the pecking order.  So, if your Apache
> is running with as high a "nice number"  as 60 ("nice number" is
Unix-speak
> for the number used to compute actual process priority  :o), it's grabbing
> way too little, rather than too much, CPU time.  But if "ps -l" (process
> status, long version) reports Apache with a "PRI" value of 60, rather than
a
> "NICE" value of 60, then you're correct that Apache is gobbling up your
> system's resources.
>
> Have you tried back-tracking, so to speak?  Apache, I believe, ordinarily
> runs as a single parent process that automatically spawns (generates)
> several child processes.  (I believe the number of children is equal to
the
> value you've defined for the MaxClients parameter.)  Anyway, if there are
> child processes hung up or that won't shut themselves down gracefully, the
> parent process might not be able to generate new children.  So, when
you're
> eyeballing PIDs, it might help to trace them back to their respective
PPIDs
> (parent process IDs), if any.  In any case, you might be able to use the
> command "nice" to correct the 60+ priority value.  If "ps -el" reports
> something like " ... PRI 60   NICE 30", syntax something like "nice +20
> httpd" should result in ps giving you more reasonable output, such as "
...
> PRI 80   NICE 50".  (I'm pulling these values off the top of my head, but
I
> think you get the idea.)
>
> Re: memory limits, I would tend to think that it's processor time that's
> your problem.  Another command you might want to try, though, in order to
> determine the relative weight of both memory and CPU time in your
situation,
> is "top".  It'll give you a real-time picture.  It reports on parameters
> such as CPU load overall, how much of that is user and how much is system,
a
> breakdown of memory usage by command - lots of good info.
>
> Hope this helps.
>
> Michele
> ----- Original Message -----
> >From: "Cartoon Factory" <gallery@cartoon-factory.com>
> To: <users@httpd.apache.org>
> Sent: Friday, August 02, 2002 1:33 PM
> Subject: Server going Wild
>
>
> > Hi:
> >
> > I am running Apache 1.3.26 on FreeBSD 4.6
> >
> > I have an occasional problem with processes running wild... it just
starts
> > snowballing, gobbling up memory are resources, and slowing things way
> down.
> >
> > I am trying to track down the cause of this, but thus far, I have had no
> > luck. I have added PID to the access logs, and when this runs wild, I
> search
> > for that PID, but I have not yet been able to catch what is causing
this.
> >
> > So, in the meantime, I want to see if I can configure Apache to close
down
> > the wild processes. I have noticed that when it get's going, the
Priority
> > shoots way up to 60+. Is there a way (or, better, WHAT is the way) I can
> > have apache shut down a process that has a priority over 60? Is this
wise?
> >
> > I have tried RLimitMEM (RLimitMEM 40000 50000), but that does not allow
> some
> > cgi scripts to run... should I use that instead, and set the limits
higher
> > (and how high?).
> >
> > Any other suggestions so I do not have to stay glued to TOP?
> >
> > I am a real newbie, (sorry) so please be a bit verbose in your response,
> so
> > I can understand!
> >
> > Thank You!
> > -------------------
> >
> > Dave Koch
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message