Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:274 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8338 invoked from network); 25 Mar 2003 16:31:41 -0000 Received: from unknown (HELO cn-sfo1-g7-2.cnet.com) (206.16.5.38) by pb1.pair.com with SMTP; 25 Mar 2003 16:31:41 -0000 Received: from cnet.com (ianhxp1.cnet.cnwk [10.16.90.221] (may be forged)) by cn-sfo1-g7-2.cnet.com (8.9.3/8.9.3) with ESMTP id IAA14101; Tue, 25 Mar 2003 08:31:37 -0800 (PST) Message-ID: <3E80844E.6040206@cnet.com> Date: Tue, 25 Mar 2003 08:31:10 -0800 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Rasmus Lerdorf CC: internals@lists.php.net, ilya@prohost.org References: <200303251052.28910.ilia@prohost.org> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Preliminary Apache 2 benchmarks From: IanH@cnet.com (Ian Holsman) Hi Guys. just a couple of questions about the test. 1. was the code-base exactly the same except for the sapi handler (ie.. your not comparing 4.3.1 against cvs-head) I'm assuming this is true 2. how many machines were you using to run your test. if you were running the test from the same machine, then you can't really trust the results. 3. what testing tool where you using ? 4. can you do me a favor, and re-run the same benchmark on a php file which has NO php inside of it. my guess is that we are being too streamy. (ie.. passing the output as soon as we get it, instead of just pushing it in a big chunk) #4 should show this if it were true. BTW.. most of the code for the apache2 sapi's are identical, it's only the creation of buckets which is different. also.. while I've got your guys attention.. there are a lot of bugs coming up about using a threaded version of apache2 hanging on startup with cvs-head... I thought this was working ok on 4.3.1.. any idea on what might have changed in TSRM ? Regards Ian (ps..grabbing a snapshot now and trying the tests out on a couple of boxes over here) Rasmus Lerdorf wrote: > What are the numbers for Apache 1.3 for the same tests? > > On Tue, 25 Mar 2003, Ilia A. wrote: > > >>Based on bug #22815, which talks about unsatisfactory performance of the >>apache 2 sapi, I've decided to conduct several benchmarks to determine the >>depth of the problem. >> >>Based on my tests (ran using 4.3.2-cvs on 1Ghz celeron) it appears that the >>apache2handler is indeed slower. >> >>The test script used was >>>for ($i=0; $i<100;$i++) { >> echo $i; >>} >>?> >> >>This script resulted in a 270 byte header being generated in addition to 190 >>bytes of actual content. >> >>Apache 2 filter (the original apache 2 sapi) was able to handle 143 >>requests/second, while Apache2handler (newer & more stable sapi) could handle >>only 133 requests/second. This represents aproximately 7% performance loss >>for rather small request. >> >>My next test was an attempt to determine the performance difference for larger >>requests that one may encounter in real life situations. >> >>Test script #2 >>> $str = str_repeat('a', 4096); >> for ($i=0; $i<8; $i++) { >> echo $str; >> } >>?> >> >>With Apache 2 filter I was able to send between 150-167 requests per second, >>each request comprising of header 270 bytes and content 32768 bytes, with a >>Net I/O: 4895.8 KB/s. The increase in perfromance can be explained by a >>significantly lower number of calls to the output function and tunning the >>output to benefit the most from output buffering. >> >>Same test with Apache 2 handler resulted in: >> >>Request rate: 132.0 req/s (7.6 ms/req) >>Reply rate [replies/s]: min 117.4 avg 132.0 max 152.3 >>Net I/O: 3915.6 KB/s >>CPU time [s]: user 7.63 system 38.92 (user 10.1% system 51.4% total 61.5%) >> >> >>All tests were conducated 10 times a piece and a total of 10000 requests were >>sent during each test instance. >> >>Ilia >> >>-- >>PHP Internals - PHP Runtime Development Mailing List >>To unsubscribe, visit: http://www.php.net/unsub.php >> > >