00001 /* Licensed to the Apache Software Foundation (ASF) under one or more 00002 * contributor license agreements. See the NOTICE file distributed with 00003 * this work for additional information regarding copyright ownership. 00004 * The ASF licenses this file to You under the Apache License, Version 2.0 00005 * (the "License"); you may not use this file except in compliance with 00006 * the License. You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00024 #ifndef APACHE_MPM_DEFAULT_H 00025 #define APACHE_MPM_DEFAULT_H 00026 00027 /* Number of servers to spawn off by default --- also, if fewer than 00028 * this free when the caretaker checks, it will spawn more. 00029 */ 00030 #ifndef DEFAULT_START_DAEMON 00031 #define DEFAULT_START_DAEMON 1 00032 #endif 00033 00034 /* Maximum number of *free* server processes --- more than this, and 00035 * they will die off. 00036 */ 00037 00038 #ifndef DEFAULT_MAX_FREE_DAEMON 00039 #define DEFAULT_MAX_FREE_DAEMON 1 00040 #endif 00041 00042 /* Minimum --- fewer than this, and more will be created */ 00043 00044 #ifndef DEFAULT_MIN_FREE_DAEMON 00045 #define DEFAULT_MIN_FREE_DAEMON 1 00046 #endif 00047 00048 /* Limit on the threads per process. Clients will be locked out if more than 00049 * this * HARD_SERVER_LIMIT are needed. 00050 * 00051 * We keep this for one reason it keeps the size of the scoreboard file small 00052 * enough that we can read the whole thing without worrying too much about 00053 * the overhead. 00054 */ 00055 #ifndef HARD_THREAD_LIMIT 00056 #define HARD_THREAD_LIMIT 2048 00057 #endif 00058 00059 #ifndef DEFAULT_THREADS_PER_CHILD 00060 #define DEFAULT_THREADS_PER_CHILD 50 00061 #endif 00062 00063 /* Number of threads to spawn off by default --- also, if fewer than 00064 * this free when the caretaker checks, it will spawn more. 00065 */ 00066 #ifndef DEFAULT_START_THREADS 00067 #define DEFAULT_START_THREADS DEFAULT_THREADS_PER_CHILD 00068 #endif 00069 00070 /* Maximum number of *free* threads --- more than this, and 00071 * they will die off. 00072 */ 00073 00074 #ifndef DEFAULT_MAX_FREE_THREADS 00075 #define DEFAULT_MAX_FREE_THREADS 100 00076 #endif 00077 00078 /* Minimum --- fewer than this, and more will be created */ 00079 00080 #ifndef DEFAULT_MIN_FREE_THREADS 00081 #define DEFAULT_MIN_FREE_THREADS 10 00082 #endif 00083 00084 /* Check for definition of DEFAULT_REL_RUNTIMEDIR */ 00085 #ifndef DEFAULT_REL_RUNTIMEDIR 00086 #define DEFAULT_REL_RUNTIMEDIR "logs" 00087 #endif 00088 00089 /* File used for accept locking, when we use a file */ 00090 /*#ifndef DEFAULT_LOCKFILE 00091 #define DEFAULT_LOCKFILE DEFAULT_REL_RUNTIMEDIR "/accept.lock" 00092 #endif 00093 */ 00094 00095 /* Where the main/parent process's pid is logged */ 00096 /*#ifndef DEFAULT_PIDLOG 00097 #define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid" 00098 #endif 00099 */ 00100 00101 /* 00102 * Interval, in microseconds, between scoreboard maintenance. 00103 */ 00104 #ifndef SCOREBOARD_MAINTENANCE_INTERVAL 00105 #define SCOREBOARD_MAINTENANCE_INTERVAL 1000000 00106 #endif 00107 00108 /* Number of requests to try to handle in a single process. If <= 0, 00109 * the children don't die off. 00110 */ 00111 #ifndef DEFAULT_MAX_REQUESTS_PER_CHILD 00112 #define DEFAULT_MAX_REQUESTS_PER_CHILD 0 00113 #endif 00114 00115 /* Default stack size allocated for each worker thread. 00116 */ 00117 #ifndef DEFAULT_THREAD_STACKSIZE 00118 #define DEFAULT_THREAD_STACKSIZE 65536 00119 #endif 00120 00121 #endif /* AP_MPM_DEFAULT_H */ 00122