Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 84980 invoked from network); 22 Jun 2006 23:36:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Jun 2006 23:36:30 -0000 Received: (qmail 83304 invoked by uid 500); 22 Jun 2006 23:36:24 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 83099 invoked by uid 500); 22 Jun 2006 23:36:23 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 83088 invoked by uid 99); 22 Jun 2006 23:36:23 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jun 2006 16:36:23 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [206.123.111.90] (HELO mail.loukasmgmt.com) (206.123.111.90) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jun 2006 16:36:21 -0700 Received: (qmail 8553 invoked by uid 510); 22 Jun 2006 18:35:57 -0500 Received: from unknown (HELO ?192.168.3.105?) (fhanik@halosg.com@72.64.67.249) by mail.loukasmgmt.com with SMTP; 22 Jun 2006 18:35:57 -0500 Message-ID: <449B294E.7020401@hanik.com> Date: Thu, 22 Jun 2006 18:35:42 -0500 From: Filip Hanik - Dev Lists User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: NIO vs BIO speed References: <4496A724.5060107@hanik.com> <200606191733.k5JHXMH7006237@harpy.wilshire.com> <35657.148.107.10.20.1150752071.squirrel@www.hanik.com> <58419.148.107.10.20.1150755091.squirrel@www.hanik.com> <4499ED66.7060705@hanik.com> <449A5472.6000106@apache.org> <449AA824.3080407@hanik.com> <449AB110.4070906@apache.org> <449AB72D.5060006@hanik.com> <449ABB64.5060504@apache.org> <449ABFC2.4040300@hanik.com> <449AC277.8060305@hanik.com> <449AC408.5040800@apache.org> <449AC497.9080304@hanik.com> <449AC79E.1060107@apache.org> <449ACB4F.3070701@ptc.com> <449ACF73.5030209@hanik.com> <449AD393.3070101@apache.org> <449B2261.9010001@hanik.com> In-Reply-To: <449B2261.9010001@hanik.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Here is another test that I ran from a remote machine, setting maxThreads="25" and ab concurrency to 50 and keepalive on. In this case, NIO is a lot faster. Turn off keepalive on ab, and we get similar results to previous run, where BIO is a tad faster. [filip@fedora4 bin]$ ./ab -n 20000 -k -c 50 http://192.168.3.105:8080/tomcat.gif (BIO) This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> 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 192.168.3.105 (be patient) Completed 2000 requests Completed 4000 requests Completed 6000 requests Completed 8000 requests Completed 10000 requests Completed 12000 requests Completed 14000 requests Completed 16000 requests Completed 18000 requests Finished 20000 requests Server Software: Apache-Coyote/1.1 Server Hostname: 192.168.3.105 Server Port: 8080 Document Path: /tomcat.gif Document Length: 1934 bytes Concurrency Level: 50 Time taken for tests: 7.41056 seconds Complete requests: 20000 Failed requests: 0 Write errors: 0 Keep-Alive requests: 10028 Total transferred: 43239331 bytes HTML transferred: 38687126 bytes Requests per second: 2840.48 [#/sec] (mean) Time per request: 17.603 [ms] (mean) Time per request: 0.352 [ms] (mean, across all concurrent requests) Transfer rate: 5996.97 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 5 22.1 0 3009 Processing: 0 11 5.8 11 273 Waiting: 0 10 5.4 11 226 Total: 0 16 22.9 16 3027 Percentage of the requests served within a certain time (ms) 50% 16 66% 21 75% 23 80% 24 90% 26 95% 28 98% 30 99% 32 100% 3027 (longest request) [filip@fedora4 bin]$ ./ab -n 20000 -k -c 50 http://192.168.3.105:8081/tomcat.gif This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> 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 192.168.3.105 (be patient) Completed 2000 requests Completed 4000 requests Completed 6000 requests Completed 8000 requests Completed 10000 requests Completed 12000 requests Completed 14000 requests Completed 16000 requests Completed 18000 requests Finished 20000 requests Server Software: Apache-Coyote/1.1 Server Hostname: 192.168.3.105 Server Port: 8081 Document Path: /tomcat.gif Document Length: 1934 bytes Concurrency Level: 50 Time taken for tests: 5.526996 seconds Complete requests: 20000 Failed requests: 0 Write errors: 0 Keep-Alive requests: 20000 Total transferred: 43281248 bytes HTML transferred: 38681018 bytes Requests per second: 3618.60 [#/sec] (mean) Time per request: 13.817 [ms] (mean) Time per request: 0.276 [ms] (mean, across all concurrent requests) Transfer rate: 7647.19 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.1 0 3 Processing: 1 13 3.7 13 220 Waiting: 1 13 3.7 13 220 Total: 1 13 3.8 13 220 Percentage of the requests served within a certain time (ms) 50% 13 66% 14 75% 15 80% 16 90% 17 95% 19 98% 21 99% 22 100% 220 (longest request) [filip@fedora4 bin]$ --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org