I did test on APC (alternative PHP cache).
I tried 83840 request on one and same file, the file is nothing special, mostly procedural code, uses one object to connect to MySQL server, but caches the results in a file, located in /dev/shm.
System used:
Hardware:
Single Xeon 3075 @ 2.66GHz,
8 GB RAM,
2 x 500 GB Hitachi HDP72505 in RAID1
Software:
CentOS 5.6
Apache/2.2.19 prefork
PHP 5.3.6
MySQL 5.1.55-MariaDB
The APC were used only to cache PHP opt-code. Here are the results:
-------------------------------------------------- | | requests | time | gain | -------------------------------------------------- | without APC | 83,840 requests | 21 min | | | with APC | 83,840 requests | 16 min | 23% | --------------------------------------------------
Then we decided to see check if MySQL result caching have something to do with the result. We used only PHP with APC. Results was strange and we did not saw any improvement. Probably results would be different if MySQL server was busy.
------------------------------------------------------------------ | | requests | time | time | ------------------------------------------------------------------ | with APC, without any cache,| | | | | but with MySQL intern cache | 83,840 requests | 19 min | | | with APC, cache on disk | 83,840 requests | 19 min | | | with APC, cache on APC | 83,840 requests | 19 min | | | with APC, cache on /dev/shm | 83,840 requests | 16 min | | ------------------------------------------------------------------