You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2003/02/20 05:01:11 UTC
Re: [mp2] increase winnt threadsperchild?
Randy Kobes wrote:
> In running the tests on Win32, lately I've been getting
> a timeout in starting the server when doing 'nmake test'.
> Changing ThreadsPerChild as in
>
> =========================================================
> Index: Apache-Test/lib/Apache/TestConfig.pm
> ===================================================================
> RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
> retrieving revision 1.145
> diff -u -r1.145 TestConfig.pm
> --- Apache-Test/lib/Apache/TestConfig.pm 27 Jan 2003 09:09:54 -0000 1.145
> +++ Apache-Test/lib/Apache/TestConfig.pm 20 Feb 2003 05:23:05 -0000
> @@ -1582,7 +1582,7 @@
> </IfModule>
>
> <IfModule mpm_winnt.c>
> - ThreadsPerChild 10
> + ThreadsPerChild 25
> MaxRequestsPerChild 0
> </IfModule>
> ==========================================================
> helps in this regard.
May I ask, why would this make any difference? I'm asking because I
experience the same delays with threaded mpm on linux. Usually it takes
about 30-60 secs to start (compared to just a few secs for prefork) and
many times it'll bypass the 60 secs timeout and abort.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] increase winnt threadsperchild?
Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
> On Thu, 20 Feb 2003, William A. Rowe, Jr. wrote:
>
>
>>At 01:06 AM 2/20/2003, Stas Bekman wrote:
>>
>>
>>>Bill, is there a relation between a number of vhosts and a
>>>number of spawned threads for the startup times? Is it a
>>>correct observation from Randy, that you need to start at
>>>least N threads, where N is the number of vhosts?
>>
>>No. But it probably indicates a problem in the MPM - we should
>>not be timing out if things start up in any reasonable amount
>>of time. Even if you are throwing many requests at the server.
Sorry for not being clear. The timeout is not in httpd, but in the test suite.
We give 60 secs for the server to start (which is a *lot*) and give up if the
server hasn't started yet. The question was whether the shortage on threads
may cause the startup slowdown. But as you have replied it's most likely doesn't.
>>I'll play with trying to knock over the server with 10 threads
>>or so.
>
>
> It didn't seem like there should be a relation; however, I
> thought it coincidental that ThreadsPerChild had to be set
> (apparently) to the number of vhosts in order to run the tests.
> For anything less, either a timeout in starting the server
> results, or it tries to start and then hangs, with an error
> message created in the logs suggesting to raise ThreadsPerChild,
> as the server ran out of threads to serve requests. But this just
> might be a coincidence, with other factors at play ...
OK, I suggest that we then raise the number of ThreadsPerChild so not to ruin
the testing experience. Though it'd be nice to investigate the reason for this
behavior. Our test suite always runs one request at a time (no sub-requests so
far I think), so even 1 thread should be enough to serve them all, unless
there are threads whose only purpose is to listen on each vhost's port, and
then it explains why you need at least the same number of threads as the
number of vhosts.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] increase winnt threadsperchild?
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Thu, 20 Feb 2003, William A. Rowe, Jr. wrote:
> At 01:06 AM 2/20/2003, Stas Bekman wrote:
>
> >Bill, is there a relation between a number of vhosts and a
> >number of spawned threads for the startup times? Is it a
> >correct observation from Randy, that you need to start at
> >least N threads, where N is the number of vhosts?
>
> No. But it probably indicates a problem in the MPM - we should
> not be timing out if things start up in any reasonable amount
> of time. Even if you are throwing many requests at the server.
> I'll play with trying to knock over the server with 10 threads
> or so.
It didn't seem like there should be a relation; however, I
thought it coincidental that ThreadsPerChild had to be set
(apparently) to the number of vhosts in order to run the tests.
For anything less, either a timeout in starting the server
results, or it tries to start and then hangs, with an error
message created in the logs suggesting to raise ThreadsPerChild,
as the server ran out of threads to serve requests. But this just
might be a coincidence, with other factors at play ...
--
best regards,
randy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] increase winnt threadsperchild?
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 01:06 AM 2/20/2003, Stas Bekman wrote:
>Randy Kobes wrote:
>>On Thu, 20 Feb 2003, Stas Bekman wrote:
>>
>>>Randy Kobes wrote:
>>>
>>>>In running the tests on Win32, lately I've been getting
>>>>a timeout in starting the server when doing 'nmake test'.
>>>>Changing ThreadsPerChild as in
>>>>
>>>><IfModule mpm_winnt.c>
>>>>- ThreadsPerChild 10
>>>>+ ThreadsPerChild 25
>>>> MaxRequestsPerChild 0
>>>></IfModule>
>>>>========================================================== helps in this regard.
>>>
>>>May I ask, why would this make any difference? I'm asking
>>>because I experience the same delays with threaded mpm on
>>>linux. Usually it takes about 30-60 secs to start (compared to
>>>just a few secs for prefork) and many times it'll bypass the 60
>>>secs timeout and abort.
>>
>>I was guessing it was due to the tests starting up with listening
>>on 8529-8542 (on my system), for 14 in all. If I have
>>ThreadsPerChild = 13, I get a timeout usually, although
>>occasionally it (apparently) starts, but then hangs. With
>>ThreadsPerChild = 14, this happens only rarely. Also, though, if
>>I start a single, or a selected group of tests, these problems
>>don't occur as often.
>>It may be just a quirk of my system; maybe it's better to
>>leave it and see if anyone else has similar problems.
>
>Bill, as the main developer of winnt mpm, probably knows the best.
Well, that would probably be Stoddard, at least as far as blame of
design... I'm mostly mopping up till I get a chance to start it from
scratch all over again ;-)
>Bill, is there a relation between a number of vhosts and a number of spawned threads for the startup times? Is it a correct observation from Randy, that you need to start at least N threads, where N is the number of vhosts?
No. But it probably indicates a problem in the MPM - we should not be
timing out if things start up in any reasonable amount of time. Even if
you are throwing many requests at the server. I'll play with trying to
knock over the server with 10 threads or so.
>Does the same apply for the worker mpm?
Only the per-child MPM has any thread/proc relationship between the
number of VHosts and workers (as perchild has one process per vhost,
at least those vhosts with alternate uid/gid assignments.)
There might be a listeners/workers relationship, however. Look there
for probable suspects.
Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] increase winnt threadsperchild?
Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
> On Thu, 20 Feb 2003, Stas Bekman wrote:
>
>
>>Randy Kobes wrote:
>>
>>>In running the tests on Win32, lately I've been getting
>>>a timeout in starting the server when doing 'nmake test'.
>>>Changing ThreadsPerChild as in
>>>
>>>=========================================================
>>>Index: Apache-Test/lib/Apache/TestConfig.pm
>>>===================================================================
>>>RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
>>>retrieving revision 1.145
>>>diff -u -r1.145 TestConfig.pm
>>>--- Apache-Test/lib/Apache/TestConfig.pm 27 Jan 2003 09:09:54 -0000 1.145
>>>+++ Apache-Test/lib/Apache/TestConfig.pm 20 Feb 2003 05:23:05 -0000
>>>@@ -1582,7 +1582,7 @@
>>> </IfModule>
>>>
>>> <IfModule mpm_winnt.c>
>>>- ThreadsPerChild 10
>>>+ ThreadsPerChild 25
>>> MaxRequestsPerChild 0
>>> </IfModule>
>>>==========================================================
>>>helps in this regard.
>>
>>May I ask, why would this make any difference? I'm asking
>>because I experience the same delays with threaded mpm on
>>linux. Usually it takes about 30-60 secs to start (compared to
>>just a few secs for prefork) and many times it'll bypass the 60
>>secs timeout and abort.
>
>
> I was guessing it was due to the tests starting up with listening
> on 8529-8542 (on my system), for 14 in all. If I have
> ThreadsPerChild = 13, I get a timeout usually, although
> occasionally it (apparently) starts, but then hangs. With
> ThreadsPerChild = 14, this happens only rarely. Also, though, if
> I start a single, or a selected group of tests, these problems
> don't occur as often.
>
> It may be just a quirk of my system; maybe it's better to
> leave it and see if anyone else has similar problems.
Bill, as the main developer of winnt mpm, probably knows the best.
Bill, is there a relation between a number of vhosts and a number of spawned
threads for the startup times? Is it a correct observation from Randy, that
you need to start at least N threads, where N is the number of vhosts?
Does the same apply for the worker mpm?
Thanks a lot!
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] increase winnt threadsperchild?
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Thu, 20 Feb 2003, Stas Bekman wrote:
> Randy Kobes wrote:
> > In running the tests on Win32, lately I've been getting
> > a timeout in starting the server when doing 'nmake test'.
> > Changing ThreadsPerChild as in
> >
> > =========================================================
> > Index: Apache-Test/lib/Apache/TestConfig.pm
> > ===================================================================
> > RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
> > retrieving revision 1.145
> > diff -u -r1.145 TestConfig.pm
> > --- Apache-Test/lib/Apache/TestConfig.pm 27 Jan 2003 09:09:54 -0000 1.145
> > +++ Apache-Test/lib/Apache/TestConfig.pm 20 Feb 2003 05:23:05 -0000
> > @@ -1582,7 +1582,7 @@
> > </IfModule>
> >
> > <IfModule mpm_winnt.c>
> > - ThreadsPerChild 10
> > + ThreadsPerChild 25
> > MaxRequestsPerChild 0
> > </IfModule>
> > ==========================================================
> > helps in this regard.
>
> May I ask, why would this make any difference? I'm asking
> because I experience the same delays with threaded mpm on
> linux. Usually it takes about 30-60 secs to start (compared to
> just a few secs for prefork) and many times it'll bypass the 60
> secs timeout and abort.
I was guessing it was due to the tests starting up with listening
on 8529-8542 (on my system), for 14 in all. If I have
ThreadsPerChild = 13, I get a timeout usually, although
occasionally it (apparently) starts, but then hangs. With
ThreadsPerChild = 14, this happens only rarely. Also, though, if
I start a single, or a selected group of tests, these problems
don't occur as often.
It may be just a quirk of my system; maybe it's better to
leave it and see if anyone else has similar problems.
--
best regards,
randy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org