Categories
Web Server

Apache Prefork vs Worker

Prefork

Every request gets its own (memory-separated) process

Worker

Multi-threaded Apache, uses threads instead of processes, is generally faster than prefork and might use less memory

In regards to PHP

As PHP is not thread-safe, the common suggestion is to install Apache with the “prefork” MPM.

Reference: http://www.php.net/manual/en/faq.installation.php#faq.installation.apache2

Note: Debian will automatically choose the right Apache version if you’re installing PHP.

Differences between Apache MPMs

http://httpd.apache.org/docs/2.0/en/mod/#core