Re: XCache, APC, Memcached... confused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> First of all you need to get it clear in your head what an opcode cache 
> is actually doing. It does not "cache the website", it caches the 
> compiled version of the PHP scripts such that PHP doesn't need to 
> recompile each file every time it's included which is the default way 
> PHP works.

And, to be really clear, the savings in compile time is gravy.

The REAL savings is not hitting that slow-spinning disk drive to LOAD the PHP script into RAM.

You'd get very similar performance boost if the opcode cache simply cached the PHP source.

But it's just as easy to cache the compiled version, and that saves a few more microseconds/milliseconds.

Depends how big/long/convoluted the PHP source is, but, really, it rarely is that big of a file.

I doubt that 2 opcode caches can run in parallel, as they both "hook" into the same line of code in PHP.  And if they did run in parallel, the second one would not help in the least, and would actually just be more overhead for zero gain.

PS
All the opcode caches have a strategy for unloading less-used scripts if RAM is full, so don't sweat it unless you have crazy number of scripts.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux