|Version 6 (modified by moo, 11 years ago) (diff)|
Introduction to XCache
XCache is a open-source opcode cacher, which means that it accelerates the performance of PHP on servers. It optimizes performance by removing the compilation time of PHP scripts by caching the compiled state of PHP scripts into the shm (RAM) and uses the compiled version straight from the RAM. This will increase the rate of page generation time by up to 5 times as it also optimizes many other aspects of php scripts and reduce serverload.
The XCache project is lead by mOo who is also a developer of Lighttpd. Lighttpd is one of the fastest webserver programs and outperforms Apache and many other open source webserving projects so the same is being done to XCache.
Do you (the author of XCache) know apc, eaccelerator, phpa, truck-mmcache ?
Yeah, i know them very well.
I've noticed phpa (PHP Accelerator) long ago, the time while truck-mmcache is still under maintained actively. But saidly phpa's project died and never updated it's code to support newly released versions of PHP. So i used truck-mmcache for a period of time, but... it hang or crash continously after being under high load. I noticed APC later, but I've been reading both APC/truck-mmcache source for a long time (I can't write XCache if haven't read them), discovering that APC code is simpler and beautiful than mmcache's. Features are good, but i believe the stability is more important. So I finally turned to run APC online -- simpler often means more stable. mmcache forked eaccelerator later, and they setup www.eaccelerator.net, running trac.
But why do you write XCache after that? Why not contribute to ea/apc?
I DID filing bug report, submiting patches to both http://pecl.php.net/bugs/search.php?cmd=display&package_name[=APC&status=All apc bug report system] and truck-mmcache on sf.net and interactive with communicate with zoeloelip, one of the main developer of eaccelerator. He's the first one read my XCache source, long before XCache is published online. I'm not sure, but i guess the idea he rewrite ea_dasm.c is base on my Disassembler idea in XCache :)
There are many reasons for me to write XCache instead of using APC or EA:
- Something too big to be made into them (ea/apc).
- I have many new ideas on opcode cacher, but i just can't break their cacher to prove my ideas.
- To prove my programming skills? Making project oneself isn't that simple. With only programming skill is far insufficient, you need to become project admin, designing how the project will be, foresee the cost and benefits ... blah blah
To conclude, I've finished writting XCache for quite a long time, before then I had used APC. Although it was quite stable for a php4 with flock() configuration it had become unstable once I upgraded my server to a dual cpu (4 threaded cpu) because it flock()ed badly so XCache was used instead and seems to have solved the problem.
ea/apc is still good opcode cacher, as long as it's maintained actively, and if it's stable for you.
What's special in XCache?
btw. I myself, focus XCache on study for stable, for code generating.