lighttpd forum XCache > Apache 2.0 mod_fcgid, xcache and many fcgi instances/vhosts

Posted by Markus Krebs
on 05.03.2008 03:55
Hi,

i have the following setup:

apache 2.0 with mod-fcgid (fastcgi compatible) and php4.4.7 as well as 
php5.2.5 instances running under fcgid, mod_php4 is also running 
separately for some vhosts.
since i experienced high cpu load with eaccelerator and mod-fcgid/php i 
decided to switch to xcache.

i soon found out that the memory between the xcache-fcgids was not 
shared (/dev/zero) but i still have 40+ vhosts on this server running 
under fcgid/php...
now i have the following questions:

1.) if i have n instances of fcgid/php running, will xcache use 
n*configured_memsize in total?

2.) will there be problems if a busy site (3 or 4 of them) spawns more 
than one fcgid/php process?

i read a lot about problems with fastcgi (remember, i use mod_fcgid) 
spawning more than one parent process with xcache. so what about 
Apache+mod_fcgid+xcache then? so far i found no info on that 
configuration...

Best regards,
makro
Posted by moo XCache
on 05.03.2008 11:18
> i soon found out that the memory between the xcache-fcgids was not 
> shared (/dev/zero) but i still have 40+ vhosts on this server running 
> under fcgid/php...
> now i have the following questions:
> 
> 1.) if i have n instances of fcgid/php running, will xcache use 
> n*configured_memsize in total?
yep
> 
> 2.) will there be problems if a busy site (3 or 4 of them) spawns more 
> than one fcgid/php process?
just memory usage issue
> 
> i read a lot about problems with fastcgi (remember, i use mod_fcgid) 
> spawning more than one parent process with xcache. so what about 
> Apache+mod_fcgid+xcache then? so far i found no info on that 
> configuration...
just try to make it 1 php parent with n childs
Posted by Markus Krebs
on 05.03.2008 19:51
Thanks a lot for the info, moo.

Still a question on this:

>> i read a lot about problems with fastcgi (remember, i use mod_fcgid) 
>> spawning more than one parent process with xcache. so what about 
>> Apache+mod_fcgid+xcache then? so far i found no info on that 
>> configuration...
> just try to make it 1 php parent with n childs

How?
I find the mod_fcgid "documentation" not so understandable as, say httpd 
docs (including examples for popular or advisable configurations).
The difference between MaxClassProcessCount and MaxProcessCount is not 
clear enough to me yet.

Currently i am using this config in the global server context:

MaxProcessCount 200
DefaultMaxClassProcessCount 100
DefaultMinClassProcessCount -1


Can you help me to gain a better understanding of these three parameters 
and an example of a config that uses 1 parent per vhost?
are there any caveats using a single parent?

best regards,
makro