How to Do Email Marketing Free of Cost | StudyObject
Digital Marketing has never been on the rise as much as during lockdown. All...
We are going to discuss PHP MPM Worker which gives a big performance boost to the user requests while doing the scaling. It is gold when it comes to supporting huge web traffic. We will dig into Apache MPM performance side !
Apache has two types of MPM
Server version: Apache/2.4.43 (cPanel)
Server built: May 5 2020 18:56:17
Server's Module Magic Number: 20120211:92
Server loaded: APR 1.7.0, APR-UTIL 1.6.1
Compiled using: APR 1.7.0, APR-UTIL 1.6.1
Architecture: 64-bit
Server MPM: worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
httpd -t -D DUMP_MODULES | grep mpm
mpm_worker_module (shared) //if loaded module shows worker then it is MPM worker type
We will do a quick summary of apache MPM prefork, it implements non threaded and preforking web server. Apache maintains a directive named MaxRequestWorkers in its configuration which defines the Maximum number of connections that will be processed simultaneously. We suggest to choose this value based on RAM size.
Apache httpd always tries to maintain several spare or idle server processes, which stand ready to serve incoming requests. In this way, clients do not need to wait for a new child processes to be forked before their requests can be served.
Let’s discuss how exactly Apache MPM prefork uses few directives to process the requests. Following directives are used to control the request. These are configurable, I am keeping some default values to explain.
There is difference in meaning of few directives when Apache MPM worker is in use.
You can compare serverlimit with no of cores, so lets say your CPU has 4 cores then Ideally you should set serverlimit as 4.
You may try to set serverlimit as 8 if 4 core supports hyper threading(Meaning CPU is 4 core/8 threads)
Try above combinations and share your experience in comment section. Apache MPM Worker makes use of precious CPU better than prefork.
Author: Rajnish K
About Author :
Rajnishk is R&D Expert ,passionate for Web Stack & an Entrepreneur . He can be reached at info@studyobject.com