Re: Re: PHP Security
| From: | Paul Reinheimer | Date: | Sat, 11 Dec 2004 03:26:23 +0000 |
| Subject: | Re: Re: PHP Security | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-204028@lists.php.net to get a copy of this message | ||
I beleive the performance hit is much higher than the %2 increase you
are refering to:
$ cat /.../loadtest.php
<?php
header('Content-Type: image/png');
readfile('placeholderimage.png');
?>
$ ./ab -n 1000 -c 50 http://.../loadtest.php
Time taken for tests: 1.653 seconds
Complete requests: 1000
...
Requests per second: 604.96 [#/sec] (mean)
Time per request: 82.65 [ms] (mean)
Time per request: 1.65 [ms] (mean, across all concurrent requests)
Transfer rate: 15177.50 [Kbytes/sec] received
$ ./ab -n 1000 -c 50 http://.../placeholderimage.png
Time taken for tests: 0.809 seconds
Complete requests: 1000
...
Requests per second: 1236.09 [#/sec] (mean)
Time per request: 40.45 [ms] (mean)
Time per request: 0.81 [ms] (mean, across all concurrent requests)
Transfer rate: 30854.14 [Kbytes/sec] received
Apache 1.3.31, PHP 5.0.2
As you can see, once you move past the single request point, and
actually occupy the server for a few moments the hit is far more than
2%.
paul
--
Paul Reinheimer