Re: ignored patches
| From: | Brian Shire | Date: | Tue, 04 Dec 2007 06:58:25 +0000 |
| Subject: | Re: ignored patches | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-33628@lists.php.net to get a copy of this message | ||
On Dec 3, 2007, at 9:16 PM, Gregory Beaver wrote:
Brian Shire wrote:Hi Greg, I'm sorry that my message probably did come off as condescending. :-( I really just wanted to share some my *own* pitfalls in case it was something that might be helpful here. If you aren't too put off and you are running APC then perhaps we can discuss more off-list as some of our performance problems may be similar and I could exchange some optimizations with you to try out. Again *extremely* sorry for insulting you or anyone else here with my not so well thought out email, I'd just like to try to help out a bit. -shireOn Dec 3, 2007, at 2:17 PM, Stanislav Malyshev wrote:Hi Brian and Stas, I hate to say it, but it is somewhat condescending to assume that the benchmarks were done with microtime(). I spent about 15 hours of my time designing a very complex, carefully constructed benchmark, and yes, I ran it with apache benchmark. In addition, I ran the benchmark using no APC, with APC, and with APC and apc.stat=0. The benchmark in question compared require_once to include with full paths to a single file. In the best case, I got a 12% performance difference between include with full paths and apc.stat=0 and a single file.I've seen this come up before internally at Facebook. Many people do a microtime() test within there code and consider this a definitive benchmark of how fast there script runs. Unfortunately this excludes a lot of work that's done prior to execution. Typically we see people claiming gains from combining files when in actuality they where just excluding the compilation time in their benchmark by moving compilation done via includes() to before the initial script begins executing. When measuring this type of optimization one really must measure outside of PHP using something like an Apache Bench tool so you get an idea of the big picture. I think trying to optimize these also presumes that you're already running a bytecode cache etc.I am a developer on a CMS also which uses the auto-include functionality to include many classes over many files. Each request can include up to 30 different files. The speed increase is around the 15% mark when combining the files. This is with APC installed too.Can you provide some benchmark setups that this could be researched - i.e. describe what was benchmarked and how to reproduce it?