Re: How does the Zend engine behave?

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

 



On Fri, October 27, 2006 12:11 am, Sean Pringle wrote:
>> The Caching systems such as Zend Cache (not the Optimizer), MMCache,
>> APC, etc are expressly designed to store the tokenized version of
>> the
>> PHP script to be executed.
>>
>> Note that their REAL performance savings is actually in loading from
>> the hard drive into RAM, not actually the PHP tokenization.
>>
>> Skipping a hard drive seek and read is probably at least 95% of the
>> savings, even in the longest real-world scripts.
>
> Interesting.  If PHP tokenization is such a small cost, what makes a
> special caching system better than the OS for caching files in memory
> after the first disk read?

Your OS caching system doesn't know the difference between data files
that may or may not get re-used, and PHP scripts, like your homepage,
that are getting the crap beat out of them when you get slash-dotted.

The OS caching can build up a history of oft-used files and if you
have, say, a hit-song MP3 that's getting downloaded 1000 X a second,
is probably the way to go.

But if your goal is to get your codebase into RAM so that it can load
up what seems like a random distribution of data, a code cache is the
way to go.

If you're not sure what the hell you're doing, use both and play with
the parameters until it's fast enough, then focus on something else.

Disclaimer:
I am making this answer up with zero real-world experience, no
benchmarks, and little theoretical proof.  Test it yourself if you
want to be certain.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
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