httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/winnt mpm_default.h mpm_winnt.c
Date Fri, 30 Aug 2002 16:13:00 GMT
stoddard    2002/08/30 09:13:00

  Modified:    server/mpm/winnt mpm_default.h mpm_winnt.c
  Log:
  Win32: First cut as cleaning up mpm_default.h defaults
  
  Revision  Changes    Path
  1.14      +23 -14    httpd-2.0/server/mpm/winnt/mpm_default.h
  
  Index: mpm_default.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_default.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mpm_default.h	4 Apr 2002 09:15:44 -0000	1.13
  +++ mpm_default.h	30 Aug 2002 16:12:59 -0000	1.14
  @@ -59,26 +59,35 @@
   #ifndef APACHE_MPM_DEFAULT_H
   #define APACHE_MPM_DEFAULT_H
   
  -/* Number of threads to spawn off by default --- also, if fewer than
  - * this free when the caretaker checks, it will spawn more.
  +/* Default limit on the maximum setting of the ThreadsPerChild configuration
  + * directive.  This limit can be overridden with the ThreadLimit directive.
  + * This limit directly influences the amount of shared storage that is allocated
  + * for the scoreboard. DEFAULT_THREAD_LIMIT represents a good compromise
  + * between scoreboard size and the ability of the server to handle the most
  + * common installation requirements.
    */
  -#ifndef DEFAULT_START_THREAD
  -#define DEFAULT_START_THREAD 5
  +#ifndef DEFAULT_THREAD_LIMIT
  +#define DEFAULT_THREAD_LIMIT 1920
   #endif
   
  -/* Maximum number of *free* server threads --- more than this, and
  - * they will die off.
  -#ifndef DEFAULT_MAX_SPARE_THREAD
  -#define DEFAULT_MAX_SPARE_THREAD 10
  +/* The ThreadLimit directive can be used to override the DEFAULT_THREAD_LIMIT.
  + * ThreadLimit cannot be tuned larger than MAX_THREAD_LIMIT.
  + * This is a sort of compile-time limit to help catch typos.
  + */
  +#ifndef MAX_THREAD_LIMIT
  +#define MAX_THREAD_LIMIT 15000
   #endif
  -*/
   
  -/* Minimum --- fewer than this, and more will be created */
  -/*
  -#ifndef DEFAULT_MIN_SPARE_THREAD
  -#define DEFAULT_MIN_SPARE_THREAD 5
  +/* Number of threads started in the child process in the absence
  + * of a ThreadsPerChild configuration directive
  + */
  +#ifndef DEFAULT_THREADS_PER_CHILD
  +#define DEFAULT_THREADS_PER_CHILD 64
   #endif
  -*/
  +
  +/* Max number of child processes allowed.
  + */
  +#define HARD_SERVER_LIMIT 1
   
   /* Number of servers to spawn off by default
    */
  
  
  
  1.295     +1 -31     httpd-2.0/server/mpm/winnt/mpm_winnt.c
  
  Index: mpm_winnt.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
  retrieving revision 1.294
  retrieving revision 1.295
  diff -u -r1.294 -r1.295
  --- mpm_winnt.c	28 Aug 2002 17:25:56 -0000	1.294
  +++ mpm_winnt.c	30 Aug 2002 16:12:59 -0000	1.295
  @@ -81,36 +81,6 @@
   #include <malloc.h>
   #include "apr_atomic.h"
   
  -/* Limit on the threads per process.  Clients will be locked out if more than
  - * this  * 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.
  - */
  -#ifndef DEFAULT_THREAD_LIMIT
  -#define DEFAULT_THREAD_LIMIT 1920
  -#endif
  -
  -/* Admin can't tune ThreadLimit beyond MAX_THREAD_LIMIT.  We want
  - * some sort of compile-time limit to help catch typos.
  - */
  -#ifndef MAX_THREAD_LIMIT
  -#define MAX_THREAD_LIMIT 15000
  -#endif
  -
  -/* Limit on the total --- clients will be locked out if more servers than
  - * this are needed.  It is intended solely to keep the server from crashing
  - * when things get out of hand.
  - *
  - * We keep a hard maximum number of servers, for two reasons --- first off,
  - * in case something goes seriously wrong, we want to stop the fork bomb
  - * short of actually crashing the machine we're running on by filling some
  - * kernel table.  Secondly, it keeps the size of the scoreboard file small
  - * enough that we can read the whole thing without worrying too much about
  - * the overhead.
  - */
  -#define HARD_SERVER_LIMIT 1
   
   /* scoreboard.c does the heavy lifting; all we do is create the child
    * score by moving a handle down the pipe into the child's stdin.
  @@ -1413,7 +1383,7 @@
       }
   
       ap_listen_pre_config();
  -    ap_threads_per_child = DEFAULT_START_THREAD;
  +    ap_threads_per_child = DEFAULT_THREADS_PER_CHILD;
       ap_pid_fname = DEFAULT_PIDLOG;
       ap_max_requests_per_child = DEFAULT_MAX_REQUESTS_PER_CHILD;
   
  
  
  

Mime
View raw message