You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ed...@cec.eu.int on 2003/04/10 13:47:24 UTC
[users@httpd] Surprising rewriting cost...
Hi list,
I've been trying a few runs of the ab (apache bench).
I'm quite surprised by the results of a test, I made very simple attempts at
noticing a cost of "rewriting", through very simple rules (crappy set
written for the tests, not actually to be used).
RewriteRule ^sample32\.txt$ file32k.txt
RewriteRule ^([0-9]+)sample\.txt$ target$1k.txt
RewriteRule ^([0-9]+)k([a-z]+)\.([a-z]+)$ $2$1k.$3
I ran a bench on each file. And the first rule, which seems so much simpler
to compute than the others is the most "expensive" speaking of performance
(small excerpt from results) :
Server
Requested Url
Concurrency level
Avg Total Resp Time
Test desc
Apache/2.0.44
/sample32.txt
250
674
Simple static file, direct request, no rewrite involved
Apache/2.0.44
/rewrite/sample32.txt
250
2832 <--------------------- Very different from other stats which are more
like 700 ms.
1st rule, simple one
Apache/2.0.44
/rewrite/32sample.txt
250
767
2nd rule
Apache/2.0.44
/rewrite/32kmatching.txt
250
729
3rd rule
Any of the knowledgeable guys round here got an idea about the reasons for
this ?
It's not a true problem, but I'm quite surprised and after a few trials the
results still account for the added cost of the very simple (and yes I know,
inappropriate, written just for the sake of the test) rewrite rule.
Kind regards,
ECB
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Surprising rewriting cost...
Posted by Dirk-Willem van Gulik <di...@webweaving.org>.
On Thu, 10 Apr 2003 Eddy.COLLART@cec.eu.int wrote:
> RewriteRule ^sample32\.txt$ file32k.txt
> RewriteRule ^([0-9]+)sample\.txt$ target$1k.txt
> RewriteRule ^([0-9]+)k([a-z]+)\.([a-z]+)$ $2$1k.$3
...
> It's not a true problem, but I'm quite surprised and after a few trials the
> results still account for the added cost of the very simple (and yes I know,
> inappropriate, written just for the sake of the test) rewrite rule.
...
My first guess would be either an extra internal redirect or that somehow
a complete directory walk (to make sure .htaccess is followed) is
triggered. Does it make a diffrence if you have allowoverride on or off ?
Dw
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org