From: Jeff Trawick
The directive AcceptMutex
can be used to
- change the selected mutuex implimentation at run-time.
USE_FLOCK_SERIALIZED_ACCEPT
AcceptMutex flock
This method uses the flock(2)
system call to
lock a lock file (located by the LockFile
directive).
USE_FCNTL_SERIALIZED_ACCEPT
AcceptMutex fcntl
This method uses the fcntl(2)
system call to
lock a lock file (located by the LockFile
directive).
USE_SYSVSEM_SERIALIZED_ACCEPT
AcceptMutex sysvsem
(1.3 or later) This method uses SysV-style semaphores to @@ -707,24 +707,7 @@ on most IRIX boxes).
USE_USLOCK_SERIALIZED_ACCEPT
(1.3 or later) This method is only available on IRIX, and
- uses usconfig(2)
to create a mutex. While this
- method avoids the hassles of SysV-style semaphores, it is not
- the default for IRIX. This is because on single processor
- IRIX boxes (5.3 or 6.2) the uslock code is two orders of
- magnitude slower than the SysV-semaphore code. On
- multi-processor IRIX boxes the uslock code is an order of
- magnitude faster than the SysV-semaphore code. Kind of a
- messed up situation. So if you're using a multiprocessor IRIX
- box then you should rebuild your webserver with
- -DUSE_USLOCK_SERIALIZED_ACCEPT
on the
- EXTRA_CFLAGS
.
USE_PTHREAD_SERIALIZED_ACCEPT
AcceptMutex pthread
(1.3 or later) This method uses POSIX mutexes and should @@ -735,11 +718,21 @@ hanging and not responding. Static content only servers may work just fine.
AcceptMutex posixsem
(2.0 or later) This method uses POSIX semaphores. The + semaphore ownership is not recovered if a thread in the process + holding the mutex segfaults, resulting in a hang of the web + server.
+If your system has another method of serialization which isn't in the above list then it may be worthwhile adding code - for it (and submitting a patch back to Apache).
+ for it to APR.Another solution that has been considered but never implemented is to partially serialize the loop -- that is, let diff --git a/docs/manual/misc/perf-tuning.xml b/docs/manual/misc/perf-tuning.xml index 6a751ebf48..3e4fd24371 100644 --- a/docs/manual/misc/perf-tuning.xml +++ b/docs/manual/misc/perf-tuning.xml @@ -689,10 +689,10 @@
The directive
USE_FLOCK_SERIALIZED_ACCEPT
AcceptMutex flock
This method uses the flock(2)
system call to
@@ -700,7 +700,7 @@
>LockFile directive).
USE_FCNTL_SERIALIZED_ACCEPT
AcceptMutex fcntl
This method uses the fcntl(2)
system call to
@@ -708,7 +708,7 @@
>LockFile directive).
USE_SYSVSEM_SERIALIZED_ACCEPT
AcceptMutex sysvsem
(1.3 or later) This method uses SysV-style semaphores to @@ -725,24 +725,7 @@ on most IRIX boxes).
USE_USLOCK_SERIALIZED_ACCEPT
(1.3 or later) This method is only available on IRIX, and
- uses usconfig(2)
to create a mutex. While this
- method avoids the hassles of SysV-style semaphores, it is not
- the default for IRIX. This is because on single processor
- IRIX boxes (5.3 or 6.2) the uslock code is two orders of
- magnitude slower than the SysV-semaphore code. On
- multi-processor IRIX boxes the uslock code is an order of
- magnitude faster than the SysV-semaphore code. Kind of a
- messed up situation. So if you're using a multiprocessor IRIX
- box then you should rebuild your webserver with
- -DUSE_USLOCK_SERIALIZED_ACCEPT
on the
- EXTRA_CFLAGS
.
USE_PTHREAD_SERIALIZED_ACCEPT
AcceptMutex pthread
(1.3 or later) This method uses POSIX mutexes and should @@ -753,11 +736,21 @@ hanging and not responding. Static content only servers may work just fine.
AcceptMutex posixsem
(2.0 or later) This method uses POSIX semaphores. The + semaphore ownership is not recovered if a thread in the process + holding the mutex segfaults, resulting in a hang of the web + server.
+If your system has another method of serialization which isn't in the above list then it may be worthwhile adding code - for it (and submitting a patch back to Apache).
+ for it to APR.Another solution that has been considered but never implemented is to partially serialize the loop -- that is, let