Hello,
I set server by using Igor Seletskiy blog, where he describes how fcgid and opcode cachers works. I will citate:
Lets first explore how mod_fcgid works:
When request comes in for PHP, mod_fcgid checks if there is idle php process available for that user. If there is none, it starts a new one (up to FCGIDMaxProcessesPerClass, default 100). The request is served, and php process becomes idle. Until next request comes in.
Lets now add opcode caching, like eAccelerator, APC or xCache. Opcode caching software saves opcode (php pre-compiled into "operation code" ) into shared memory. Next time it has to process same PHP file, PHP process would not compile php, using opcode from cache instead.That will significantly decreasing CPU usage, and improving performance.
PHP processes with opcode cache enabled use shared memory for opcode caching. Yet, PHP processes will be able to "share" that shared memory, only if they were all created (forked) from the same, original PHP process, that allocated that shared memory.
This is not the case with mod_fcgid, as each and every PHP process is started by mod_fcgid itself. As the result, they don't "share" shared memory. In this case. each PHP process has its own shared memory, amd no opcode is shared between processes.
So, if process A is responding for request for index.php, and process B is responding to request for index.php, each of them will store its own copy of opcode in its own cache.
Yet, on the second request for index.php to process A, that process can use cached opcode. Gven that single PHP process can process thousands of requests -- opcode caching is useful with mod_fcgid.
Here are all clear. I choosed fastcgi and eaccelerator and set values.
But I included mod_expire settings and mod_deflate settings for all server accounts by using Pre virtual host include, global conf. This settings are as follow:
# Cache Control Settings for one hour cache
Header set Cache-Control "max-age=3600, public"
Header set Cache-Control "max-age=3600, public, must-revalidate"
Header set Cache-Control "max-age=3600, must-revalidate"
# Mod Deflate performs data compression
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE no-gzip
I understand how fastcgi and eaccelerator works. But, is not clear to me how mod expire and mod deflate interact with these settings.
Does mod expire and mod deflate I set globally, could speed down Web pages load in some cases, or break fcgid and eaccelerator to work properly.
Please, for answer, if anybody knows how this process works in this combination set: fcgid (fastcgi), eaccelerator, mod_expire and mod_deflate together.
Any explanation of this process, for example for index.php..ect
Many thank you for your time and wish to help me!
|