httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject Re: Both ap_r* patches.
Date Sun, 21 Jan 2001 22:38:06 GMT
here's a better test, that ends up spitting out:
[2bytes] aa
[4bytes] aaaa
[8bytes] aaaaaaaa
[16bytes] aaaaaaaaaaaaaaaa
[32bytes] aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
and so on up to 8192 for each character a..Z :

package Apache::rwrite;

use strict;

sub handler {
    my $r = shift;

    $r->send_http_header;

    for my $c ('a'..'Z') {
        my $n = 2;
        while ($n <= 8192) {
            $r->write("[", $n, "bytes", "] ", $c x $n);
            $r->write("\n");
            $n *= 2;
        }
    }

    return Apache::OK;
}

1;

"[", $n, "bytes", "] " could of course be written as "[${n}bytes] ", but i
wanted to sprinkle in some smaller pieces of data.

$r->write calls ap_rwrite() underneath for each argument, so 5 times for
the first call, once for the second.

the results show greg's faster, however, that is due to a bug, missing
lots of data (notice document length and transfered bytes).  the output
with rbb.new patch is exactly the same if i run the output loop(s) outside
of apache.

i also just realized i'm not calling ap_rflush() at all, but i don't think
that is required for this test case, is it?

% ab -c 5 -n 1000 http://localhost:8082/rwrite

with rbb.new patch:
Server Software:        Apache/2.0b1-dev                                   
Server Hostname:        localhost
Server Port:            8082

Document Path:          /rwrite
Document Length:        429858 bytes

Concurrency Level:      5
Time taken for tests:   28.132 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      430585672 bytes
HTML transferred:       430398298 bytes
Requests per second:    35.55
Transfer rate:          15305.90 kb/s received

Connnection Times (ms)
              min   avg   max
Connect:        0     5    89
Processing:    80   134   853
Total:         80   139   942

with greg.new patch:
Server Software:        Apache/2.0b1-dev                                   
Server Hostname:        localhost
Server Port:            8082

Document Path:          /rwrite
Document Length:        302418 bytes

Concurrency Level:      5
Time taken for tests:   24.402 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      303423701 bytes
HTML transferred:       303236140 bytes
Requests per second:    40.98
Transfer rate:          12434.38 kb/s received

Connnection Times (ms)
              min   avg   max
Connect:        0     7    93
Processing:    37   113  1246
Total:         37   120  1339


Mime
View raw message