> Here is an strace of the static portion of the SPECWeb99 benchmark.
>
> http://www.apache.org/~gregames/strace.spec_static
>
> This includes two keepalive connections with multiple requests on each
> connection, with Apache 2.0.43 running on a Red Hat 7.2 box.  The number
> preceding the syscall is the time delta from the start of the
> preceding syscall;
> the <number> at the end is the time spent in the syscall itself.
>
> Some observations:
>
> The disk files aren't closed until the connection terminates.  I assume we're
> using the connection pool for some file structure.  It's probably not
> a big deal
> for prefork, but for a threaded MPM it could result in a lot of open files in
> one process.
>
> There sure are a lot of gettimeofday syscalls, often with nothing between them
> that can block.

One of them is probably here (in function ap_meets_conditions). Is there any
reason we cannot use r->request_time here?


Index: http/http_protocol.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
retrieving revision 1.462
diff -u -u -r1.462 http_protocol.c
--- http/http_protocol.c        11 Oct 2002 15:29:20 -0000      1.462
+++ http/http_protocol.c        29 Oct 2002 22:34:14 -0000
@@ -319,5 +319,5 @@
      * highest time resolution the HTTP specification allows.
      */
     /* XXX: we should define a "time unset" constant */
-    tmp_time = ((r->mtime != 0) ? r->mtime : apr_time_now());
+    tmp_time = ((r->mtime != 0) ? r->mtime : r->request_time);
     mtime =  apr_time_sec(tmp_time);

Reply via email to