Which apache mpm am i using




















Apache can run only one of them at a time. Mpms are not modules that are loaded by apache. Instead they are compiled into apache. Now run the apache binary with the "l" option.

It provides a list of all the modules that have been compiled into apache. In the above output it can be see that worker. Apache2 has support for both prefork and worker. These are both MPMs, but are quite different from one another. The prefork module creates a number of child processes at launch, each child process handles only one thread.

Conversely, worker uses child processes which spawn many threads per process, with each thread ready to take on new requests. Although prefork requires considerably more RAM, it is the safest module and should be employed when using non-thread-safe libraries. If you see no results, prefork isn't loaded. On the off-chance your web server does need significant overhead, you can make adjustments to the prefork configuration.

To do this, issue the command:. You might want to bump those numbers up considerably, if you know your server is going to be under a larger load and you have the RAM to spare , you could alter that configuration like so:. Make sure to edit those numbers according to what your hardware can handle and your expected load will require.

Save and close the file. Restart Apache with the command:. If you're interested in testing this out, you can run a Perl script. Briefly: if you on 2. As of February , the Apache 2. See the Limitations section. The issue is that, as a proxy, the worker cannot tell where the end of the response is, and will be forced to wait until the entire response is seen before returning control to the listener.

For this reason, it seems that using the Worker model may be best for when apache is used as a proxy. It is not really clear to me if there are advantages to the event model in a proxy environment, but perhaps there are.

Mostly depends on which Apache modules you want to use. I think worker is generally the default choice, but some older modules require forking and depend on prefork. If you have no preferences, I recommend you go with the preferred dependency from your OS distribution. Ubuntu for example will by default install mpm-worker when you install Apache2.

Python Javascript Linux Cheat sheet Contact. It's probably not advisable to use prefork unless you need a module that's not thread safe. Don't use if: Your modules won't break in threading.



0コメント

  • 1000 / 1000