Using Apache worker MPM to improve passenger performance

Source: Internet
Author: User

See the recommendations of http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/ , It is intended to test the performance improvement of the passenger using the worker mpm.


Experiment Settings:
Subjects: Web service written by rails

Lab Tools: http://gatling.io/-based performance test code written by yourself in Scala

Two experimental groups

    • Prefork MPM (default)-Apache defaults to the current MPM

    • Worker MPM-need to change from prefork to worker mode

How to change from Prefork to worker mode

    1. replace httpd=/usr/sbin/httpd in/etc/sysconfig/httpd file into Httpd=/usr/sbin/httpd.worker

2. Restart Apache


Experimental results:

    1. In general, using the worker MPM mode is faster than Prefork mode, especially if Apache has not generated all the processes to handle all the connections.

    2. When prefork working mode Apache generates all the processes, the speed of the two is basically the same. But because these newly generated httpd processes consume a lot of memory.


Experimental conclusion:

In general, the Prefork mode is used for compatibility, and the access mod_php is incompatible with the worker because it is not thread-safe. If you use a Apache2.4 version you should consider using the worker MPM. If you update to 2.4 you can consider the event MPM. A new MPM. Can read http://httpd.apache.org/docs/current/mod/event.html


This article is from the "Coder Instant" blog, please make sure to keep this source http://mingleiwang.blog.51cto.com/9532994/1568659

Using Apache worker MPM to improve passenger performance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.