You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by gr...@apache.org on 2005/04/14 23:26:05 UTC
svn commit: r161354 - httpd/httpd/trunk/modules/mappers/mod_rewrite.c
Author: gregames
Date: Thu Apr 14 14:26:01 2005
New Revision: 161354
URL: http://svn.apache.org/viewcvs?view=rev&rev=161354
Log:
lookup_map_txtfile: used buffered i/o rather than reading RewriteMap txt: files
one byte at a time.
I was horrified to see a dump of a server with hundreds of worker threads in
read() syscalls, all trying to read a 149k RewriteMap file simultaneously.
each thread finds one key, inserts it into the cache, then the rest of the
information is discarded. there are further improvements which could be made but
let's try the simplest first.
Modified:
httpd/httpd/trunk/modules/mappers/mod_rewrite.c
Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?view=diff&r1=161353&r2=161354
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Thu Apr 14 14:26:01 2005
@@ -1238,7 +1238,7 @@
char line[REWRITE_MAX_TXT_MAP_LINE + 1]; /* +1 for \0 */
char *value, *keylast;
- if (apr_file_open(&fp, file, APR_READ, APR_OS_DEFAULT,
+ if (apr_file_open(&fp, file, APR_READ|APR_BUFFERED, APR_OS_DEFAULT,
r->pool) != APR_SUCCESS) {
return NULL;
}
Re: svn commit: r161354 - httpd/httpd/trunk/modules/mappers/mod_rewrite.c
Posted by Jeff Trawick <tr...@gmail.com>.
On 4/14/05, gregames@apache.org <gr...@apache.org> wrote:
> Author: gregames
> Date: Thu Apr 14 14:26:01 2005
> New Revision: 161354
>
> URL: http://svn.apache.org/viewcvs?view=rev&rev=161354
> Log:
> lookup_map_txtfile: used buffered i/o rather than reading RewriteMap txt: files
> one byte at a time.
CH-CH-CH-CH-CHANGES
ST-ST-ST-ST-...