LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-25-2009, 01:57 AM   #1
mario.almeida
Member
 
Registered: May 2008
Location: India
Distribution: Ubuntu 10.04, CentOS, Manjaro
Posts: 179

Rep: Reputation: 27
apache MPM prefork or worker


Hi All,

IBM x3550 M2
CPU : 1 Quad Core Intel(R) Xeon(R) CPU E5504 @ 2.00GHz
Mem : 6081776 kB
OS : CentOS 5.3 64bit

=== APACHE (httpd -l) ===
Compiled in modules:
core.c
prefork.c
http_core.c
mod_so.c
=======================

=== APACHE (httpd -V) ====
Server version: Apache/2.2.14 (Unix)
Server built: Oct 14 2009 13:20:11
Server's Module Magic Number: 20051115:23
Server loaded: APR 1.3.8, APR-Util 1.3.9
Compiled using: APR 1.3.8, APR-Util 1.3.9
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-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=128
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
============================================================

=== PHP (php -v) =======
PHP 5.2.11 (cli) (built: Sep 21 2009 14:52:42)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
===========================

Would like to know with php 5.2.11 worker will give better performance or prefork

google result says that if php then use prefork
e.g:- this one --> http://serverfault.com/questions/450...ntages-of-each

as per Apache docs if multi CPU then worker gives better performance.

Anyone could suggest me what would best suit for my dynamic website
I am using Drupal.

//Remy
 
Old 11-25-2009, 02:00 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by mario.almeida
google result says that if php then use prefork
e.g:- this one --> http://serverfault.com/questions/450...ntages-of-each
You already answered your own question. Another reference, from IBM:

http://www.ibm.com/developerworks/li...ne-lamp-2.html

Quote:
Choosing the MPM to use depends on many factors. Setting aside the event MPM until it leaves experimental status, it's a choice between threads or no threads. On the surface, threading sounds better than forking, if all the underlying modules are thread safe, including all the libraries used by PHP. Prefork is the safer choice; you should do careful testing if you choose worker. The performance gains also depend on the libraries that come with your distribution and your hardware.
 
Old 11-26-2009, 12:45 AM   #3
mario.almeida
Member
 
Registered: May 2008
Location: India
Distribution: Ubuntu 10.04, CentOS, Manjaro
Posts: 179

Original Poster
Rep: Reputation: 27
Thanks anomie,

My doubt is clear.

Basically I'll have to do a full test if I want to move to worker.

Thanks,

//Remy
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache tuning question: prefork.c vs worker.c BrianK Linux - Networking 10 02-09-2012 02:42 PM
Configure apache prefork MPM LinuxCommandos Linux - Server 1 11-07-2008 11:09 AM
what should i set in worker MPM and prefork MPM? modpriest Linux - Newbie 5 02-21-2008 07:25 PM
how can i tell if apache 2 is prefork or worker? sneakyimp Linux - Software 4 09-15-2007 03:15 PM
what if I use worker and prefork on apache? gottin Linux - Software 1 10-15-2004 04:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration