Since apache2.0 comes out, running lines into a quite ideal way, so I still think that the process mode is inferior until this morning. But from today's actual use, the process mode is still better than threads in some places.
Example: Although it is a little bit, though it is old, but running a apache php should be a problem :) Memory 2G original this machine is Apache1.12 php4.0.1 very old . I have been running for a few years, I haven't had any problems. However, the number of visits is now increased, and httpd.h is not modified when compiled, so MaxClint can only support to 256, and the demand is not satisfied, otherwise the speed is quite slow. Since the previous ideological curing is considered to be better performance, and 2.0 does not need to modify the source code, set :). Therefore, Apache2.0.50 php4.3.8 is recompiled. Since other MPM is used, other MPMs have always felt a general, this time is still trap. . . :). After the compilation and installation is complete, configure MPM, set 3 parameters: MaxClient 1000 ThreadsperChild 25ServerLimit 40 This setting I think not very much. . . Up to 40 processes, each process contains 25 threads. However, the actual situation is very bad, and the Load Average begins to rise rapidly, up to more than 200. . . Damn, then I think the parameters are too big. I started from the beginning: MaxClient 300 Threadsperchild 30ServerLimit 10 is still not. Load Average still will be string. . . I have also tried some parameters including very variants to set Threadsperchild to 1, while ServerLimit is set to 300, or will be string. Setting ServerLimit to 200, there is no Apache1.x in the case of Threadsperchild or 1. Finally, I can only recompile Apache and PHP, select 1.3.31, modify httpd.h, support the maximum connection to 2560, and MaxClient is set to 800, ps -ef | grep -i httpd | wc -l probably Near 500, Load Average is also normal. No exceeding 10, generally stable in about 5.
Of course, it is necessary to declare that the thread mode is really better in the case where the machine performance is relatively high, especially the CPU is better than the process. But there is still something to consider, the page on my side needs to be deal with the Oracle database and the Java program, so this page may be better. This is my idea, welcome to refute me! Point out that I understand that there is a biased place!