On Sun, 2006-10-29 at 19:44 +0100, Robert Olofsson wrote: 
> Robert Olofsson wrote:
> > I could benchmark my proxy with and without transferTo/transferFom
> > though, that could be an interesting benchmark and that is easy to
> > check.
> 
> A small and benchmark with my proxy, rabbit, gives me interesting
> numbers. I run this command:
> ab2 -n10000 -c100 -X localhost:9666 \
> http://www.khelekore.org/~robo/arcs.png
> 
> To enable/disable transfer support I change one line:
> "if (mayTransfer ()" into "if (false && mayTransfer ()"
> 
> With transfer support:
> Requests per second:    1478.70 [#/sec] (mean)
> 
> Without transfer:
> Requests per second:    1095.34 [#/sec] (mean)
> 
> This is not a very good benchmark, so I omit the details.
> I do think that the speed difference is quite big...
> 
> /robo

Hi Robert

This does look interesting. The difference is significant indeed. We
should definitely look into possibility of making use of
transferTo/transferForm methods in order to increase performance of disk
bound operations.

These are the numbers comparing the blocking (threaded) I/O with
non-blocking based on the latest HttpCore SVN snapshot. The difference
is 70%, which is quite a lot. When serving larger content and using
chunk-encoding the difference should get closer to 100%. I fully admit
the benchmark may not be very representative, but it largely supports my
observation about raw performance of NIO based transports.  

Oleg

========================================================
Blocking I/O
========================================================
[EMAIL PROTECTED]:~$ ab2 -n 200000 -c 50 -k http://localhost:8080/index.html
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation,
http://www.apache.org/

Benchmarking localhost (be patient)

Server Software:        Jakarta-HttpComponents/1.1
Server Hostname:        localhost
Server Port:            8080

Document Path:          /index.html
Document Length:        12928 bytes

Concurrency Level:      50
Time taken for tests:   54.63056 seconds
Complete requests:      200000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    200000
Total transferred:      -1676135260 bytes
HTML transferred:       -1708940672 bytes
Requests per second:    3699.38 [#/sec] (mean)
Time per request:       13.516 [ms] (mean)
Time per request:       0.270 [ms] (mean, across all concurrent
requests)
Transfer rate:          -30276.68 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       3
Processing:     0   12  24.2     12    2636
Waiting:        0   11  24.0     11    2633
Total:          0   12  24.2     12    2637

========================================================
Non-blocking I/O
========================================================

[EMAIL PROTECTED]:~$ ab2 -n 200000 -c 50 -k http://localhost:8080/index.html
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation,
http://www.apache.org/

Benchmarking localhost (be patient)

Server Software:        Jakarta-HttpComponents-NIO/1.1
Server Hostname:        localhost
Server Port:            8080

Document Path:          /index.html
Document Length:        12928 bytes

Concurrency Level:      50
Time taken for tests:   77.89444 seconds
Complete requests:      200000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    200000
Total transferred:      -1675636336 bytes
HTML transferred:       -1709238016 bytes
Requests per second:    2594.39 [#/sec] (mean)
Time per request:       19.272 [ms] (mean)
Time per request:       0.385 [ms] (mean, across all concurrent
requests)
Transfer rate:          -21226.81 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       2
Processing:     1   18   7.8     17     136
Waiting:        0   11   6.3     10      98
Total:          1   18   7.8     17     136





> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to