Wednesday, November 22, 2006

pecl_http response performance

I made some small tests to get an idea of the current response performance of pecl/http.


Test victim was a >300k PDF file served by Apache 2.0.55 running the worker MPM.


http://blog.iworks.at/uploads/data.serendipityThumb.png
Full size chart, PDF with stats.


The legend should be read as follows:























php=request to a PHP script serving the PDF file by HttpResponse
php-c=just like above, cached by ETag
file=request to the PDF file served directly by Apache
file-c=just like above, cached by ETag

The results surprised me, because it clearly shows that the performance drop for starting the PHP engine and doing the neccessary negotiation to provide caching is not that bad. On the other side, PHPs throughput when actually serving the file is not exciting. The current CVS version of pecl/http contains some tweaks to improve that situation, but it didn't really work out as well as I hoped.