Apache2.0.50 of Worker MPM actual exercise

zhaozj2021-02-16  94

It is still a bit problem with the wires on FreeBSD 5.2.1. So this time is installed on Sun E450:

Compilation installation:

./configure --prefix = / usr / local / apache-2.0.50 --with-mpm = worker --enable-incrude && make && make install

Configuration: (other configuration is configured according to the actual situation, here only say how to better adjust the mpm of the worker)

The default worker configuration is:

STARTSERVERS 2

MaxClients 150

Minsparethreads 25

Maxsparethreads 75

ThreadsperChild 25

MaxRequestSperChild 0

A single control process is responsible for sub-process. Each child process can establish a fixed number of threads specified by ThreadsperChild. Then, the connection is listened and processed by a stand-alone thread.

Apache always tries to maintain a spare or idle service thread pool. Thus, the client can be processed without waiting for the establishment of a thread or process. The number of initial established processes is determined by the StartServers directive. Thereafter, Apache detects the total number of hollow threads in all processes, and new or ending processes to maintain the total number within the scope specified by MinSparethreads and MaxSpareThreads. At the same time, the maximum number of clients that can be processed depends on the MaxClients directive, and the maximum number of process established depends on the ServerLimit command. ServerLimit must be greater than equal to MaxClients with ThreadsperChild.

Let's talk about the setting of a website per second and a website around 3000-4000:

STARTSERVERS 10

ServerLimit 128

Threadlimit 1024

MaxClients 4096

Minsparethreads 32

MaxSparethreads 64threadsperchild 32maxRequestsperchild 0

ServerLimit is just equal to MaxClients with ThreadsperChild, which is allowed! This is a numerical value that is carefully scrutinized. It's more testimony.

problem:

I have encountered problems, but I found that the real number of real connections is very small, generally no more than 100, but all the number of connections exceeds 6000, this ratio I personally think it is very problem, but from actual The access effect is desirable, and the speed is very ideal. I haven't thought about the reason for the time being.

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

New Post(0)