You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@attglobal.net> on 2001/12/18 15:38:53 UTC

Re: cvs commit: httpd-2.0/server/mpm/worker mpm_default.h worker.c

trawick@apache.org writes:

>   Log:
>   Change core code to allow an MPM to set hard thread/server
>   limits at startup.
>   +
>   +/* we only ever have 1 main process running... */ 
>   +#define HARD_SERVER_LIMIT 1
>   +
>   +/* Limit on the threads per process.  Clients will be locked out if more than
>   + * this  * HARD_SERVER_LIMIT are needed.
>   + *
>   + * We keep this for one reason it keeps the size of the scoreboard file small
>   + * enough that we can read the whole thing without worrying too much about
>   + * the overhead.
>   + */
>   +#ifdef NO_THREADS
>   +#define HARD_THREAD_LIMIT 1
>   +#endif
>   +#ifndef HARD_THREAD_LIMIT
>   +#define HARD_THREAD_LIMIT 50 
>   +#endif

Hmmm... (2nd thoughts :) )

mpm_default.h exists so people can edit default settings in one nice
place...  it wasn't nice for me to move these things out of
mpm_defaults.h...  I'll move them back in there...   hopefully these
settings won't be abused by modules and instead modules will call
ap_mpm_query()

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: cvs commit: httpd-2.0/server/mpm/worker mpm_default.h worker.c

Posted by Jeff Trawick <tr...@attglobal.net>.
"Brian Havard" <br...@kheldar.apana.org.au> writes:

> I'm happy to get the OS/2 MPM fixed up with the directives when I get a bit
> of time to spare. BTW, forget spmt_os2, it's defunct. I just haven't got
> around to deleting it.

Thank you, sir!

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: cvs commit: httpd-2.0/server/mpm/worker mpm_default.h worker.c

Posted by Brian Havard <br...@kheldar.apana.org.au>.
On 19 Dec 2001 10:11:09 -0500, Jeff Trawick wrote:

>Jeff Trawick <tr...@attglobal.net> writes:
>
>> Greg Ames <gr...@remulak.net> writes:
>> 
>> > > Hmmm... (2nd thoughts :) )
>> > > 
>> > > mpm_default.h exists so people can edit default settings in one nice
>> > > place...  it wasn't nice for me to move these things out of
>> > > mpm_defaults.h...  I'll move them back in there...   hopefully these
>> > > settings won't be abused by modules and instead modules will call
>> > > ap_mpm_query()
>> > 
>> > Of course we don't want admins editing .c files as a rule.  That would
>> > be a step backwards.  But if our goal is to put these params in the
>> > config file, we can live with the limits in the MPM .c files for a day
>> > or two.
>> 
>> okay, let's defer any possible movement at least until we see what
>> MPMs folks want to make smarter...
>
>At this point, prefork and worker don't even have something like
>HARD_SERVER_LIMIT/HARD_THRAD_LIMIT, FirstBill is going to do the same
>thing for the WinNT MPM, I will do the same thing for perchild once
>somebody gets the darn thing to compile/run, and I'll send a query in
>a minute to the maintainers of the other MPMs asking if they want
>
>a) to add the directives to their MPM themself, such that this issue
>   is moot
>b) they want me to move the defines for their MPM back to
>   mpm_default.h where other user-tunable MPM defines are (but for a
>   single-process multiple-thread MPM I would recommend *NOT* moving
>   HARD_SERVER_LIMIT back there :) )
>c) they want me to fix the log messages for their MPM that refer to
>   those defines so that they point to the right file to edit

I'm happy to get the OS/2 MPM fixed up with the directives when I get a bit
of time to spare. BTW, forget spmt_os2, it's defunct. I just haven't got
around to deleting it.

-- 
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------


Re: cvs commit: httpd-2.0/server/mpm/worker mpm_default.h worker.c

Posted by Jeff Trawick <tr...@attglobal.net>.
Jeff Trawick <tr...@attglobal.net> writes:

> Greg Ames <gr...@remulak.net> writes:
> 
> > > Hmmm... (2nd thoughts :) )
> > > 
> > > mpm_default.h exists so people can edit default settings in one nice
> > > place...  it wasn't nice for me to move these things out of
> > > mpm_defaults.h...  I'll move them back in there...   hopefully these
> > > settings won't be abused by modules and instead modules will call
> > > ap_mpm_query()
> > 
> > Of course we don't want admins editing .c files as a rule.  That would
> > be a step backwards.  But if our goal is to put these params in the
> > config file, we can live with the limits in the MPM .c files for a day
> > or two.
> 
> okay, let's defer any possible movement at least until we see what
> MPMs folks want to make smarter...

At this point, prefork and worker don't even have something like
HARD_SERVER_LIMIT/HARD_THRAD_LIMIT, FirstBill is going to do the same
thing for the WinNT MPM, I will do the same thing for perchild once
somebody gets the darn thing to compile/run, and I'll send a query in
a minute to the maintainers of the other MPMs asking if they want

a) to add the directives to their MPM themself, such that this issue
   is moot
b) they want me to move the defines for their MPM back to
   mpm_default.h where other user-tunable MPM defines are (but for a
   single-process multiple-thread MPM I would recommend *NOT* moving
   HARD_SERVER_LIMIT back there :) )
c) they want me to fix the log messages for their MPM that refer to
   those defines so that they point to the right file to edit

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: cvs commit: httpd-2.0/server/mpm/worker mpm_default.h worker.c

Posted by Jeff Trawick <tr...@attglobal.net>.
Greg Ames <gr...@remulak.net> writes:

> > Hmmm... (2nd thoughts :) )
> > 
> > mpm_default.h exists so people can edit default settings in one nice
> > place...  it wasn't nice for me to move these things out of
> > mpm_defaults.h...  I'll move them back in there...   hopefully these
> > settings won't be abused by modules and instead modules will call
> > ap_mpm_query()
> 
> I wouldn't move them back.  If you keep them out of the header file,
> modules will have to use to use the MPM query functions, which is
> goodness.  Once we decide how to configure the limits for worker and
> perchild, we can just use a subset of that stuff to set limits for the
> other MPMs.  
> 
> Prefork doesn't have the same potential memory consumption problem as
> worker, but it's still a pain to have to patch HARD_SERVER_LIMIT every
> time we put a new build on daedalus.  I would think the same applies to
> Win32 and OS/2 with the current hard thread limits.  

patch for daedalus^H^H^H^H^H^H^H^Hprefork on its way...

> Of course we don't want admins editing .c files as a rule.  That would
> be a step backwards.  But if our goal is to put these params in the
> config file, we can live with the limits in the MPM .c files for a day
> or two.

okay, let's defer any possible movement at least until we see what
MPMs folks want to make smarter...

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: cvs commit: httpd-2.0/server/mpm/worker mpm_default.h worker.c

Posted by Greg Ames <gr...@remulak.net>.
Jeff Trawick wrote:
> 
> trawick@apache.org writes:
> 
> >   Log:
> >   Change core code to allow an MPM to set hard thread/server
> >   limits at startup.

++1.  Thanks for doing this work, Jeff.  It always seemed wrong that we
had to recompile http_protocol.c whenever we changed the scoreboard
geometry.

> >   +
> >   +/* we only ever have 1 main process running... */
> >   +#define HARD_SERVER_LIMIT 1
> >   +
> >   +/* Limit on the threads per process.  Clients will be locked out if more than
> >   + * this  * HARD_SERVER_LIMIT are needed.
> >   + *
> >   + * We keep this for one reason it keeps the size of the scoreboard file small
> >   + * enough that we can read the whole thing without worrying too much about
> >   + * the overhead.
> >   + */
> >   +#ifdef NO_THREADS
> >   +#define HARD_THREAD_LIMIT 1
> >   +#endif
> >   +#ifndef HARD_THREAD_LIMIT
> >   +#define HARD_THREAD_LIMIT 50
> >   +#endif
> 
> Hmmm... (2nd thoughts :) )
> 
> mpm_default.h exists so people can edit default settings in one nice
> place...  it wasn't nice for me to move these things out of
> mpm_defaults.h...  I'll move them back in there...   hopefully these
> settings won't be abused by modules and instead modules will call
> ap_mpm_query()

I wouldn't move them back.  If you keep them out of the header file,
modules will have to use to use the MPM query functions, which is
goodness.  Once we decide how to configure the limits for worker and
perchild, we can just use a subset of that stuff to set limits for the
other MPMs.  

Prefork doesn't have the same potential memory consumption problem as
worker, but it's still a pain to have to patch HARD_SERVER_LIMIT every
time we put a new build on daedalus.  I would think the same applies to
Win32 and OS/2 with the current hard thread limits.  

Of course we don't want admins editing .c files as a rule.  That would
be a step backwards.  But if our goal is to put these params in the
config file, we can live with the limits in the MPM .c files for a day
or two.

Greg