+
1 2 2
  1. #1
    Status
    Offline
      Rise Company
    Engineering and Technology
    Apr 2014
    Egypt
    4,611
    10

    mpm worker vs prefork


    mpm worker vs prefork
    event MPM vs worker MPM vs prefork MPM
    Apache MPMs Prefork vs Worker vs Event
    Apache performance tip switch to MPM Event!



    MPM

    MPM

    prefork -
    worker -
    event -

    ----------------------------------------------------------------------

    Prefork


    • Implements a non-threaded, pre-forking web server.
    • The default one, most stable and also compatible with older software. Unfortunately, also the slowest.
    • Im guessing its called that because its the original version before they forked off into the other versions.
    • You will almost always find this one installed by default as many companies are too lazy to reconfigure hundreds of their servers. Theres also a shady skepticism that they dont want your server to perform that well since they want to upsell you to a bigger server sooner.

    Worker


    • Multi-Processing Module implementing a hybrid multi-threaded multi-process web server.
    • Faster than prefork and can handle more visitors.

    Event


    • A variant of the worker MPM with the goal of consuming threads only for connections with active processing.
    • The fastest MPM and considered least stablealthough fine for most people in real-world practices.
    • Uses the least resources and can handle the most visits.


    Whats the verdict?

    Go with MPM Event first. You can switch over to it easy. A few command line entries or also a simple switch in EasyApache if you have WHM/cPanel (show in the image above).
    If you have problems, then try Worker and that last is Prefork. Some people noticed faster performance with Prefork or Worker. It can depend on the type of website you have, CPU, ram use, etc. But generally with a high performance server looking to serve many visitors fast, I always recommend MPM Event.


    ----------------------------------------------------------------------

    If your system requires threads and allows for safe thread-polling, use the event MPM.
    If your system requires threads, but does not allow for safe thread-polling, use the worker MPM.
    If your system does not require threads and does not allow for safe thread-polling, use the prefork MPM

    Remember:
    If you do not select an MPM option, EasyApache installs the prefork MPM by default.
    EasyApache 4 only builds one MPM into your Apache configuration.
    The MPM ITK module is not an MPM. You must use the prefork MPM in order to use the MPM ITK Apache module. For more information, read the The MPM ITK module section.
    cPanel & WHM only supports systems that offer threads and safe-thread polling.
    :
    https://documentation.cpanel.net/dis...Modules+-+MPMs
    https://wpjohnny.com/apache-performa...-to-mpm-event/
    ------------------------------------------------------------------------
    Rise Company for Engineering & Technology
    ------------------------------------------------------------------------
    Web Hosting | Web Designing | E-Marketing

    # 1 Business Services

    Web Hosting - Business Emails

    Web Design - Google Adwords

    www.rise.company | www.rise.company/emails

    :
    ! .



  2. #2
    Status
    Offline
      Rise Company
    Engineering and Technology
    Apr 2014
    Egypt
    4,611
    10

    : mpm worker vs prefork

    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.

    ---------------------------------------------------------------------------

    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. .

    ---------------------------------------------------------------------------

    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.
    ------------------------------------------------------------------------
    Rise Company for Engineering & Technology
    ------------------------------------------------------------------------
    Web Hosting | Web Designing | E-Marketing

    # 1 Business Services

    Web Hosting - Business Emails

    Web Design - Google Adwords

    www.rise.company | www.rise.company/emails

    :
    ! .



  1. 12
    Rise Advertise
    : 0
    : 28-02-2019, 18:08
  2. ata ahci raid on
    Rise Company Rise Computer
    : 0
    : 23-01-2018, 23:15
  3. []
    Rise Advertise
    : 0
    : 09-01-2018, 05:21
  4. : 0
    : 20-06-2017, 15:10
  5. Death Note
    : 0
    : 19-09-2010, 16:22