This article presents 5 tips for configuring Apache 1.3 or Apache 2.0 servers. We will address the following configuration scenarios: Aligning Apache Accept () serialization, Apache 2.0 threads, adopting mod_ssl SSL session caching, optimizing keep-alive timeout values, and checking the server load to balance the amount of requests that the server can handle.
Acceptmutex
The Acceptmutex indicator is introduced in Apache 1.3.21 and Apache 2.0, which presents a unique opportunity to tune the performance of the server. This indicator configures the accept () handling of Apache. There is no need to accept blocking on some systems that have only one listener. This is called single Listen unserialized Accept (Slua). However, for those configurations that have multiple listeners or on an operating system that has a thundering herd problem on the receiving system call function (no matter how many listeners), the connection-acceptance program must be serialized.
A certain degree of performance analysis of accept (covalent) congestion strategy is performed by the Sander Temme. This report summarizes the strategy of the Apache 1.3.21 in this regard, as follows:
Irix's Uslock (Uslock)
POSIX cross process blocking (pthread)
SystemV semaphores (Sysvsem)
Fcntl () blocking (FCNTL)
Flock () blocking (flock)
OS/2 semaphores (Os2sem)
TPF Blocking (Tpfcore)
None (None)
Although it is possible to use Acceptmutex None, your system may be plagued by thundering herd problems and deadlocks in this configuration. These problems can cause the server to slow down processing and even stop responding. The None option is definitely not available on the actual system. Under the unofficial test, pthread locks should be the best solution. However, pthread blocking across processes is not available to all systems.
With version 2.0 and thread (worker MPM)
One notable improvement of Apache 2.0 is the support thread. Some operating systems, such as Solaris, can significantly improve system performance in the context of threading technology. Other operating systems, such as Linux, may not be significantly improved in performance.
In the case of Apache 2.0, the strategy for processing the request has been theoretical, which is called the MPM: the Multi process model. The older Apache 1.3 model is represented by Prefork MPM, which is the default MPM for 2.0 on UNIX platforms. In this mode, there is a separate process that processes each request. However, if you compile Apache 2.0 with the--with-mpm=worker option, then the server request will be handled by the thread. This approach greatly reduces the load that the operating system handles requests with a well-designed threading implementation scenario.