mark warren bracher wrote:
> I didn't ever actually see a post with newer numbers, so here goes......
>
> I tested the same 50 clients/5000 requests as stas' test in the guide.
> one pass with 2 uri params; another with 26. naturally I ran it all on
> a server big (and quiescent) enough to handle the 50 concurrent
> requests. I left out CGI since we already know it is slow.
>
> /test/params and /test/args are mod_perl handlers (I don't use
> Apache::Registry for anything) ParamsTest and ArgsTest respectively. the
> code for both handlers and the relevant pieces of ab output are pasted
> in below.
>
> -------------------------------------------------------------
> name query_length | avtime completed failed rps
> -------------------------------------------------------------
> apache_args 25 | 33.77 5000 0 1481
> apache_request 25 | 33.17 5000 0 1507
> apache_args 337 | 43.51 5000 0 1141
> apache_request 337 | 45.31 5000 0 1103
> --------------------------------------------------------------
> Non-varying sub-test parameters:
> --------------------------------------------------------------
> concurrency : 50
> connections : 5000
>
> so $apr->param is marginally faster than $r->args for the shorter query,
> marginally slower for the longer one. I think this may be because we
> can return the full hash $r->args whereas we need to map over
> $apr->param to get a hash (so param gets called three times for the
> short query, 27 times for the larger one). still, much closer numbers
> than the former test...
Thanks Mark for pushing me to rerun the benchmark :)
Actually from the tests that I just run Apache::Request::param is
actually kicks $r->args on long inputs, and a bit faster on the short
query strings. Even though as you have noticed we call $q->param() 2 x
keys times more for each request.
Here are the results:
concurrency connections name query_length | avtime
completed failed rps
--------------------------------------------------------------------------------------------
50 5000 apache_request_param 25 | 53
5000 0 900
50 2000 apache_request_param 25 | 54
2000 0 884
50 5000 r_args 25 | 55
5000 0 879
50 2000 apache_request_param 105 | 54
2000 0 879
10 5000 apache_request_param 25 | 10
5000 0 878
50 5000 r_args 105 | 55
5000 0 876
10 2000 r_args 105 | 10
2000 0 869
50 5000 apache_request_param 105 | 56
5000 0 865
10 5000 apache_request_param 105 | 10
5000 0 855
10 5000 r_args 25 | 11
5000 0 850
10 2000 apache_request_param 105 | 11
2000 0 836
10 2000 r_args 25 | 11
2000 0 835
10 2000 apache_request_param 25 | 11
2000 0 832
50 2000 r_args 25 | 58
2000 0 827
10 5000 r_args 105 | 11
5000 0 810
50 5000 apache_request_param 207 | 64
5000 0 754
50 2000 apache_request_param 337 | 64
2000 0 750
10 2000 apache_request_param 207 | 12
2000 0 749
10 2000 apache_request_param 337 | 12
2000 0 749
50 2000 apache_request_param 207 | 64
2000 0 749
10 5000 apache_request_param 207 | 12
5000 0 746
50 2000 r_args 105 | 64
2000 0 744
10 5000 apache_request_param 337 | 12
5000 0 732
50 5000 r_args 207 | 72
5000 0 671
10 2000 r_args 337 | 14
2000 0 665
10 5000 r_args 207 | 14
5000 0 661
50 2000 r_args 337 | 73
2000 0 660
10 2000 r_args 207 | 14
2000 0 657
50 5000 apache_request_param 337 | 74
5000 0 647
50 2000 r_args 207 | 75
2000 0 645
10 5000 r_args 337 | 15
5000 0 627
50 5000 r_args 337 | 81
5000 0 601
I'll update this and other benchmarks. Something that should be done
once in a while since the software's performance tend to change over the
time :)
I'll probably run many more tests and build graphs, so it'll be much
easier to see what's happening, than from looking at many numbers.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com