The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Why does MPM prefork faster than any other MPM?

Discussion in 'EasyApache' started by kiti, Mar 21, 2017.

Tags:
  1. kiti

    kiti Member

    Joined:
    Sep 16, 2015
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    france
    cPanel Access Level:
    Root Administrator
    Hi,

    I have tried to switch to MPM event. Then, i have done some stress test using ab tool. The MPM event did always better than the default MPM prefork.

    However, when i visit my websites using a special tool bar to check page load, i can see the MPM prefork is better than any other MPM..

    Furthermore, i have used tuning in my apache config with MPM event and also in my my.cnf. Is it normal or did i miss something with MPM event?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,171
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  3. Pankaj K

    Pankaj K Member

    Joined:
    Mar 13, 2017
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Root Administrator
    yes I have also found MPM prefork working better for most of the servers pretty well. Recently we faced issue on one server where MPM was set to worker and apache was hanging with the message scoreboard is not full. We have switched it to MPM prefork and server started performing well.
     
  4. ssfred

    ssfred Well-Known Member

    Joined:
    Jan 6, 2012
    Messages:
    64
    Likes Received:
    4
    Trophy Points:
    58
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello Pankaj,

    I think the performance highly depends on your requirements and resource availability. Prefork is an excellent option if you have better RAM. But when it comes to servers with relatively lower RAM, Worker and event appear to out perform prefork.

    Glad to know that switching to prefork helped you in getting the desired output :)
     
  5. kiti

    kiti Member

    Joined:
    Sep 16, 2015
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    france
    cPanel Access Level:
    Root Administrator
    For your information, my issue with MPM prefork was related to wordpress. For some reasons, the Mariadb transactions are slower using Prefork rather than worker with Wordpress. I used other CMS or coded myself PHP to mariadb and saw that prefork was great. .

    For sure, in apache, i have tuned my MPM prefork to always have the maximum
     
  6. vacancy

    vacancy Well-Known Member

    Joined:
    Sep 20, 2012
    Messages:
    122
    Likes Received:
    11
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Prefork is a more stable mpm. But both memory and CPU have their disadvantages. Not efficient in process management. Separate processing for each request is causing high resource consumption.

    Mpm event is more efficient in resource usage. But in some cases it is not as stable as prefork.

    I'm testing mpm event + php-fpm. I did not have a big problem, everything is fine.
     
Loading...

Share This Page