You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Eric Covener <co...@gmail.com> on 2015/06/05 17:11:02 UTC

Re: SO_REUSEPORT

I'm trying to review & understand how this affects process management for
things like MinSpareThreads/MaxSpareThreads e.g.

-    else if (idle_thread_count < min_spare_threads) {
+    else if (idle_thread_count < min_spare_threads / num_buckets) {
         /* terminate the free list */
         if (free_length == 0) { /* scoreboard is f

-    if (idle_thread_count > max_spare_threads) {
+    if (idle_thread_count > max_spare_threads / num_buckets) {
         /* Kill off one child */

If I wanted between 100 and 200 spare threads available to do some slow
stuff like proxy or CGI,  would we really scale it back by the # of buckets
or am I misunderstanding?

On Sun, May 17, 2015 at 4:31 PM Lu, Yingqi <yi...@intel.com> wrote:

> Hi Yann,
>
> Thank you very much for your help!
>
> Yingqi
>
> -----Original Message-----
> From: Yann Ylavic [mailto:ylavic.dev@gmail.com]
> Sent: Saturday, May 16, 2015 3:37 AM
> To: httpd
> Subject: Re: SO_REUSEPORT
>
> On Fri, May 15, 2015 at 5:12 PM, Jeff Trawick <tr...@gmail.com> wrote:
> > On Fri, May 15, 2015 at 11:02 AM, William A Rowe Jr <wrowe@rowe-clan.net
> >
> > wrote:
> >>
> >> My chief concern was that the phrase "Common Log" has a specific meaning
> >> to us.
> >>
> >> ap_mpm_common_log_startup() or something else descriptive would be a
> >> better name, but our crew is famous for not being terrific namers of
> things
> >> :)
> >>
> >> Did this compile with no warnings?  It seems statics were used without
> >> being explicitly initialized, and I don't have my copy of K&R to check
> that
> >> these are always NULL, but guessing that's so.
> >
> >
> > yes; but ISTR that NetWare is the reason for explicit initialization in
> some
> > of our multi-platform code; I dunno the rhyme
>
> s/ap_log_common/ap_log_mpm_common/ in r1679714 and added to backport
> proposal.
>
> Regarding globals/statics explicit initializations (implicit
> initialization to {0} is required by the C standard), I don't think it
> is necessary/suitable since and it may move these variables from the
> .bss to the .data section, the former being quicker to initialize (as
> a whole) at load time (though explicit initializations to {0} usually
> go to .bss too but it depends on the compiler and/or flags, and we
> don't explicitely need .data for those).
> So I did not change the code wrt this...
>

Re: SO_REUSEPORT

Posted by Yann Ylavic <yl...@gmail.com>.
On Fri, Jun 5, 2015 at 5:11 PM, Eric Covener <co...@gmail.com> wrote:
> I'm trying to review & understand how this affects process management for
> things like MinSpareThreads/MaxSpareThreads e.g.
>
> -    else if (idle_thread_count < min_spare_threads) {
> +    else if (idle_thread_count < min_spare_threads / num_buckets) {
>          /* terminate the free list */
>          if (free_length == 0) { /* scoreboard is f
>
> -    if (idle_thread_count > max_spare_threads) {
> +    if (idle_thread_count > max_spare_threads / num_buckets) {
>          /* Kill off one child */
>
> If I wanted between 100 and 200 spare threads available to do some slow
> stuff like proxy or CGI,  would we really scale it back by the # of buckets
> or am I misunderstanding?

perform_idle_server_maintenance() is now called for each bucket in the
main loop, so this won't change the number of threads maintained per
loop.