httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nilesh Govindarajan <>
Subject Re: [users@httpd] recommended setup apache/php
Date Mon, 26 Jul 2010 09:07:12 GMT
On Mon, Jul 26, 2010 at 1:26 PM, Hajo Locke <> wrote:
> Hello List,
> iam looking for most recommendend setup of apache/php for my purposes. I
> want to provide dynamical webspace for some users and there moderate volume
> pages.
> I know apache in combination with mod_php is fastest setup but i want to
> avoid mod_php for some reasons.
> Could imagine a setup like this: php is provided as fastcgi using mod_fcgid
> or mod_fastcgi (different versions possible) . Which threading model should
> apache use? worker or prefork?
> some pages recommend worker-threading for faster requests.
> Whats the opinion of the experts? which kind of setup is most recommend for
> my purposes? some people telled that php in cgi mode consumes a lot more cpu
> then mod_php. is that correct? how to avoid this?
> Thanks,
> Hajo

PHP in CGI mode consumes lot of memory because, for every request a
PHP interpreter is called up, so your memory is filled with N php
interpreters executing the same PHP code where N is the number of
online users.
There is no way to avoid it except using some different method like

FastCgi (also fcgid, its the same thing) is better as compared to
mod_php, because it gives more security i.e. the PHP interpreter is
not embedded into apache, php interpreter runs separately.
The PHP interpreter once started isn't killed by mod_{fastcgi,fcgid}
on the end of request as in CGI, but that is configurable.
Once a request finishes, the PHP interpreter keeps running, and as
soon as another request is received, the running PHP interpreter is
used to process the PHP file.
So there's no overhead of initiating the process again and again.
Also, mod_fcgid (not mod_fastcgi) caches the compiled code in memory,
so you don't need opcode caching mechanisms to accelerate PHP
performance like (eaccelerator, xcache, etc.) - reduces the memory
used by those extensions.

I personally use mod_fcgid on my server and am happy with it. It gives
stunning performance.

You should try out mod_fcgid.

Nilesh Govindarajan
VPS Hosting:

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message