From: Manoj Kasichainula Date: Fri, 23 Jul 1999 22:43:47 +0000 (+0000) Subject: Clean up and properly specify defaults for the new directives. X-Git-Tag: 1.3.7~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0a32279f0f141f492a08d4abfa6ef493ae3eb0c;p=thirdparty%2Fapache%2Fhttpd.git Clean up and properly specify defaults for the new directives. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83494 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/dexter/dexter.c b/server/mpm/dexter/dexter.c index a0ef73cbdcb..9ff919a711a 100644 --- a/server/mpm/dexter/dexter.c +++ b/server/mpm/dexter/dexter.c @@ -78,10 +78,10 @@ * Actual definitions of config globals */ -static int threads_to_start=0; /* Worker threads per child */ -static int min_spare_threads=1; -static int max_spare_threads=HARD_THREAD_LIMIT; -static int max_requests_per_child=0; +static int threads_to_start = 0; /* Worker threads per child */ +static int min_spare_threads = 0; +static int max_spare_threads = 0; +static int max_requests_per_child = 0; static char *ap_pid_fname=NULL; static int num_daemons=0; static int workers_may_exit = 0; @@ -1440,8 +1440,10 @@ static void dexter_pre_config(pool *pconf, pool *plog, pool *ptemp) unixd_pre_config(); ap_listen_pre_config(); - num_daemons = HARD_SERVER_LIMIT; - threads_to_start = DEFAULT_THREADS_PER_CHILD; + num_daemons = DEFAULT_NUM_DAEMON; + threads_to_start = DEFAULT_START_THREAD; + min_spare_threads = DEFAULT_MIN_SPARE_THREAD; + max_spare_threads = DEFAULT_MAX_SPARE_THREAD; ap_pid_fname = DEFAULT_PIDLOG; ap_lock_fname = DEFAULT_LOCKFILE; max_requests_per_child = DEFAULT_MAX_REQUESTS_PER_CHILD; diff --git a/server/mpm/dexter/mpm_default.h b/server/mpm/dexter/mpm_default.h index 32c70bb74e8..881a5204650 100644 --- a/server/mpm/dexter/mpm_default.h +++ b/server/mpm/dexter/mpm_default.h @@ -58,25 +58,42 @@ #ifndef APACHE_MPM_DEFAULT_H #define APACHE_MPM_DEFAULT_H -/* Number of servers to spawn off by default --- also, if fewer than +/* Number of threads to spawn off by default --- also, if fewer than * this free when the caretaker checks, it will spawn more. */ -#ifndef DEFAULT_START_DAEMON -#define DEFAULT_START_DAEMON 5 +#ifndef DEFAULT_START_THREAD +#define DEFAULT_START_THREAD 5 #endif -/* Maximum number of *free* server processes --- more than this, and +/* Maximum number of *free* server threads --- more than this, and * they will die off. */ -#ifndef DEFAULT_MAX_FREE_DAEMON -#define DEFAULT_MAX_FREE_DAEMON 10 +#ifndef DEFAULT_MAX_SPARE_THREAD +#define DEFAULT_MAX_SPARE_THREAD 10 #endif /* Minimum --- fewer than this, and more will be created */ -#ifndef DEFAULT_MIN_FREE_DAEMON -#define DEFAULT_MIN_FREE_DAEMON 5 +#ifndef DEFAULT_MIN_SPARE_THREAD +#define DEFAULT_MIN_SPARE_THREAD 5 +#endif + +/* 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. + */ +#ifndef HARD_THREAD_LIMIT +#define HARD_THREAD_LIMIT 64 +#endif + +/* Number of servers to spawn off by default + */ +#ifndef DEFAULT_NUM_DAEMON +#define DEFAULT_NUM_DAEMON 2 #endif /* Limit on the total --- clients will be locked out if more servers than @@ -94,19 +111,4 @@ #define HARD_SERVER_LIMIT 8 #endif -/* 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. - */ -#ifndef HARD_THREAD_LIMIT -#define HARD_THREAD_LIMIT 64 -#endif - -#ifndef DEFAULT_THREADS_PER_CHILD -#define DEFAULT_THREADS_PER_CHILD 50 -#endif - #endif /* AP_MPM_DEFAULT_H */