1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef APACHE_MPM_DEFAULT_H
18 #define APACHE_MPM_DEFAULT_H
20 /* we use the child (c) as zero in our code... */
21 #define AP_ID_FROM_CHILD_THREAD(c, t) t
22 /* as the child is always zero, just return the id... */
23 #define AP_CHILD_THREAD_FROM_ID(i) 0 , i
25 /* Number of threads to spawn off by default --- also, if fewer than
26 * this free when the caretaker checks, it will spawn more.
28 #ifndef DEFAULT_START_THREADS
29 #define DEFAULT_START_THREADS 10
33 #define DEFAULT_THREADS 1
35 #ifndef DEFAULT_THREADS
36 #define DEFAULT_THREADS 10
39 /* The following 2 settings are used to control the number of threads
40 * we have available. Normally the DEFAULT_MAX_FREE_THREADS is set
41 * to the same as the HARD_THREAD_LIMIT to avoid churning of starting
42 * new threads to replace threads killed off...
45 /* Maximum number of *free* threads --- more than this, and
48 #ifndef DEFAULT_MAX_FREE_THREADS
49 #define DEFAULT_MAX_FREE_THREADS HARD_THREAD_LIMIT
52 /* Minimum --- fewer than this, and more will be created */
53 #ifndef DEFAULT_MIN_FREE_THREADS
54 #define DEFAULT_MIN_FREE_THREADS 1
57 /* Where the main/parent process's pid is logged */
58 #ifndef DEFAULT_PIDLOG
59 #define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid"
63 * Interval, in microseconds, between scoreboard maintenance.
65 #ifndef SCOREBOARD_MAINTENANCE_INTERVAL
66 #define SCOREBOARD_MAINTENANCE_INTERVAL 1000000
69 /* Number of requests to try to handle in a single process. If == 0,
70 * the children don't die off.
72 #ifndef DEFAULT_MAX_REQUESTS_PER_THREAD
73 #define DEFAULT_MAX_REQUESTS_PER_THREAD 0
76 #endif /* AP_MPM_DEFAULT_H */