Apache2.x MPM Analysis

zhaozj2021-02-16  95

Apache2.x MPM Analysis:

MPM (MULTI-Processing Module): Performance to improve the most significant improvement relative to the version of Apache1.x.

The following MPM types can be seen in the compilation option of Apache:

--with-mpm = mpm choose the process model for apache to use.mpm = {beos | worker | prefork | MPMT_OS2 | Perchild | Leader | threadpool}

Commonly used there should be only 3: worker | prefork | Perchild

PREFORK: The function is used to use Apache's operating mode, a parent process, and then generate the corresponding child process based on the settings and connectivity. This model reliability and robustness are best. But in performance, the overhead is too large. I can't reach our "Vampire" requirements ^ _ ^. If the connection is too much, we will cause us to log in remotely, be sure to wait until the number of connections can be connected, which is the most headache. Worker: Mixed thread / process MPM. A parent process, behind is a child process with a thread. The number of threads per sub-process is fixed and the same. This is a model of the most "mediocrity", but it is also the most model of users. Because of its ability to compare all aspects. It is better than Prefork, but it has sacrificed a little robustness and reliability. This option is generally recommended. Perchild: It is also MPM for mixing threads / processes. When the PerChild MPM is started, it creates a specified number of child processes, and each child process has a specified number of threads. If the load is added, it does not establish a new process (the child process is fixed), just in the child Establish a new thread under the process. It is also characterized by configuring different users and groups for each child process. You can also specify a child process for each virtual host. This mode performance is optimal, but reliability and robustness are relatively worst. Everything you need, I personally think this model is also good. If you don't have to use a third-party module ^ _ ^.

Note: Other patterns I have no contact, so I can't say their difference and characteristics. The best and worst said above is only compared in these three modes. Well, if there is a mistake, welcome to discuss the correctness! ! !

转载请注明原文地址:https://www.9cbs.com/read-10947.html

New Post(0)