httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grega...@apache.org
Subject cvs commit: httpd-test/specweb99/specweb99-2.0 mod_specweb99.c
Date Thu, 27 Feb 2003 22:12:35 GMT
gregames    2003/02/27 14:12:35

  Modified:    specweb99/specweb99-2.0 mod_specweb99.c
  Log:
  returnHTMLPageWithFile: switch from stat() to fstat().  This produces a
  5% improvement in throughput when using ab to drive 100% standard dynamic
  GETs of the smallest SPECweb99 file.  The server is a 2-way PII running Red Hat
  Linux 7.3 with the out-of-the-box SMP kernel.
  
  Also, add a question about the need for large file support.
  
  Revision  Changes    Path
  1.25      +11 -7     httpd-test/specweb99/specweb99-2.0/mod_specweb99.c
  
  Index: mod_specweb99.c
  ===================================================================
  RCS file: /home/cvs/httpd-test/specweb99/specweb99-2.0/mod_specweb99.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- mod_specweb99.c	27 Feb 2003 21:25:27 -0000	1.24
  +++ mod_specweb99.c	27 Feb 2003 22:12:35 -0000	1.25
  @@ -254,13 +254,6 @@
       apr_off_t zero = 0;
       conn_rec *c = r->connection;
   
  -    if ((rv = apr_stat(&s, fname, APR_FINFO_SIZE, r->pool)) != APR_SUCCESS) {
  -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
  -                     "Could not stat file '%s' for reading", fname);
  -        returnHTMLPageWithMessage(r, "Error: Failed to stat the file");
  -        return;
  -    }
  -
       bp_head = returnHTMLPageHead(r);
   
       b1 = apr_bucket_transient_create(bp_head, strlen(bp_head), c->bucket_alloc);
  @@ -277,8 +270,19 @@
           return;
       }
   
  +    if ((rv = apr_file_info_get(&s, APR_FINFO_SIZE, f)) != APR_SUCCESS) {
  +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
  +                     "Could not stat file '%s' for reading", fname);
  +        returnHTMLPageWithMessage(r, "Error: Failed to stat the file");
  +        return;
  +    }
  +
       bb = apr_brigade_create(r->pool, c->bucket_alloc);
   #if APR_HAS_LARGE_FILES
  +    /* XXX Is the following test ever true?
  +     * The largest SPECweb99 file is class3_8, which is 921600 bytes long.
  +     * I'm guessing AP_MAX_SENDFILE will be something like 2G or 4G.
  +     */
       if (s.size > AP_MAX_SENDFILE) {
       /*
        * APR_HAS_LARGE_FILES issue; must split into mutiple buckets, no
  
  
  

Mime
View raw message