(Dec 29) New version 0.9.8-18 has been released

which Server MPM of Apache is better, prefork or worker ?

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Forum rules
Before creating a new topic or reply on the forum you should fill out additional fields "Os" and "Web" in your profile section.
In case of violation, the topic can be closed or response from the support will not be received.
baijianpeng
Posts: 292
Joined: Tue Dec 22, 2015 2:06 pm

which Server MPM of Apache is better, prefork or worker ?

Postby baijianpeng » Thu Apr 27, 2017 8:56 am

I came across an article about Server MPM of Apache here:

http://m.fx114.net/qa-1-243627.aspx

According to that article, Worker mode is better than Prefork mode for Apache.

However, the Apache installed by VestaCP uses "prefork" by default. You can confirm this by run following command on SSH terminal:

Code: Select all

root@:~# apache2ctl -V
Server version: Apache/2.4.18 (Ubuntu)
Server built:   2016-07-14T12:32:26
Server's Module Magic Number: 20120211:52
Server loaded:  APR 1.5.2, APR-UTIL 1.5.4
Compiled using: APR 1.5.2, APR-UTIL 1.5.4
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/etc/apache2"
 -D SUEXEC_BIN="/usr/lib/apache2/suexec"
 -D DEFAULT_PIDLOG="/var/run/apache2.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="mime.types"
 -D SERVER_CONFIG_FILE="apache2.conf"


I am not a Linux pro, so I want to discuss this topic here, hope someone will clarify this choice.

If you concluded that "worker" is better, then, hope VestaCP team will change it to Worker in next release, and, teach me how to safely switch to Worker mode now.

Thank you.

Return to “Web Server”



Who is online

Users browsing this forum: Bing [Bot] and 5 guests

cron