[ 
http://issues.apache.org/jira/browse/DIRMINA-232?page=comments#action_12424953 
] 
            
Niklas Therning commented on DIRMINA-232:
-----------------------------------------

Emmanuel suggested that the poor performance might be due to nagle which I 
indeed think is the case. Here's the result with nagle disabled:

[EMAIL PROTECTED]:~$ ab2 -k -n 100 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).....done


Server Software:        MINA
Server Hostname:        localhost
Server Port:            8080

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

Concurrency Level:      1
Time taken for tests:   0.107275 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Keep-Alive requests:    100
Total transferred:      1011400 bytes
HTML transferred:       1000000 bytes
Requests per second:    932.18 [#/sec] (mean)
Time per request:       1.073 [ms] (mean)
Time per request:       1.073 [ms] (mean, across all concurrent requests)
Transfer rate:          9200.65 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     0    0   3.3      0      32
Waiting:        0    0   3.3      0      32
Total:          0    0   3.3      0      32

Percentage of the requests served within a certain time (ms)
  50%      0
  66%      0
  75%      0
  80%      0
  90%      0
  95%      1
  98%      6
  99%     32
 100%     32 (longest request)

Add the following to Main.java before the bind call to disable nagle:

( ( SocketSessionConfig ) ( config.getSessionConfig() ) ).setTcpNoDelay( true 
); 

Thanks Emmanuel for pointing this out!

What do you think Oleg, can we close this issue?

> Performance of StreamIoHandler degrades dramatically when the IoSession is 
> kept alive between HTTP requests
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-232
>                 URL: http://issues.apache.org/jira/browse/DIRMINA-232
>             Project: Directory MINA
>          Issue Type: Bug
>    Affects Versions: 0.9.5
>         Environment: Ubuntu Linux 6.06
>            Reporter: Oleg Kalnichevski
>
> I have been observing a strange issue with MINA's StreamIoHandler while 
> benchmarking the performance of the HTTP server based on HttpCore and MINA. 
> The throughput of the StreamIoHandler tends to degrade dramatically when the 
> IoSession is kept alive between HTTP requests. The problem is perfectly 
> reproducible with a slightly modified version of HttpProtocolHandler that 
> ships with MINA (no external code is involved).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to