Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 97216 invoked from network); 5 Mar 2010 16:55:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Mar 2010 16:55:41 -0000 Received: (qmail 43645 invoked by uid 500); 5 Mar 2010 16:55:27 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 43621 invoked by uid 500); 5 Mar 2010 16:55:27 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 43613 invoked by uid 99); 5 Mar 2010 16:55:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Mar 2010 16:55:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Mar 2010 16:55:24 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id C0B2E16E0A for ; Fri, 5 Mar 2010 16:55:02 +0000 (GMT) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Fri, 05 Mar 2010 16:55:02 -0000 Message-ID: <20100305165502.10057.56321@eos.apache.org> Subject: =?utf-8?q?=5BHttpcomponents_Wiki=5D_Update_of_=22HttpClient3vsHttpClient4?= =?utf-8?q?vsHttpCore=22_by_OlegKalnichevski?= X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Httpcomponents Wiki= " for change notification. The "HttpClient3vsHttpClient4vsHttpCore" page has been changed by OlegKalni= chevski. http://wiki.apache.org/HttpComponents/HttpClient3vsHttpClient4vsHttpCore?ac= tion=3Ddiff&rev1=3D4&rev2=3D5 -------------------------------------------------- =3D Client side HTTP performance benchmarks =3D = - '''BIG FAT DISCLAIMER''': These benchmarks are NOT based on any scientifi= c methodology so the numbers are likely to be non-precise = + =3D=3D=3D Benchmark source code =3D=3D=3D = - =3D=3D Source code =3D=3D + In order to execute the benchmark locally install the latest snapshot of = HttpClient from the Apache SVN repository and an optional module = + {{{httpclient-benchmark}}} = = - [[http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpcli= ent-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpClient= 3.java|HttpClient 3.x]] - = - [[http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpcli= ent-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpClient= 4.java|HttpClient 4.x]] - = - [[http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpcli= ent-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.j= ava|HttpCore 4.x]] - = - [[http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpcli= ent-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpJRE.ja= va|JRE HTTP]] - = - =3D=3D Test platform =3D=3D - = {{{ - OS: Microsoft Windows Vista; CPU: Intel Core(tm)2 Quad Q6600@2.40GHz; RAM= : 4 GB + http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpclien= t-benchmark/ }}} = + and then execute {{{mvn test}}} command of the {{{httpclient-benchmark}}}= module + = + =3D=3D=3D Hardware specs of the system used to execute the benchmark =3D= =3D=3D + = {{{ + CPU: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz + Processor cache size: 4096 KB + RAM MemTotal: 3353824 kB + }}} + = + =3D=3D Results of HttpClient 3.1 vs HTTP JRE vs HttpCore 4.x (blocking I/= O) vs HttpClient 4.x vs Jetty 7.x (blocking I/O) =3D=3D + = + =3D=3D=3D Linux Ubuntu 9.10 / JRE 1.6 =3D=3D=3D + = + {{{ + Linux ubuntu 2.6.31-19-generic #56-Ubuntu SMP Thu Jan 28 01:26:53 UTC 201= 0 i686 GNU/Linux + }}} + = + {{{ - java version "1.6.0_13" + java version "1.6.0_18" - Java(TM) SE Runtime Environment (build 1.6.0_13-b03) + Java(TM) SE Runtime Environment (build 1.6.0_18-b07) + Java HotSpot(TM) Server VM (build 16.0-b13, mixed mode) + }}} + = + {{{ + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D + HTTP agent: Apache HttpClient 3.1 + --------------------------------- + 200000 GET requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) + = + Document URI: http://localhost:54406/rnd?c=3D2048 + Document Length: 2048 bytes + = + Time taken for tests: 19.802 seconds + Complete requests: 200000 + Failed requests: 0 + Content transferred: 409600000 bytes + Requests per second: 10099.99 [#/sec] (mean) + Time per request: 0.09901 [ms] (mean) + --------------------------------- + 200000 POST requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) + = + Document URI: http://localhost:54406/echo + Document Length: 2048 bytes + = + Time taken for tests: 20.454 seconds + Complete requests: 200000 + Failed requests: 0 + Content transferred: 409600000 bytes + Requests per second: 9778.038 [#/sec] (mean) + Time per request: 0.10227 [ms] (mean) + --------------------------------- + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D + HTTP agent: JRE HTTP 1.6.0_18 + --------------------------------- + 200000 GET requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) + = + Document URI: http://localhost:54406/rnd?c=3D2048 + Document Length: 2048 bytes + = + Time taken for tests: 19.807 seconds + Complete requests: 200000 + Failed requests: 0 + Content transferred: 409600000 bytes + Requests per second: 10097.44 [#/sec] (mean) + Time per request: 0.099035 [ms] (mean) + --------------------------------- + 200000 POST requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) + = + Document URI: http://localhost:54406/echo + Document Length: 2048 bytes + = + Time taken for tests: 22.738 seconds + Complete requests: 200000 + Failed requests: 0 + Content transferred: 409600000 bytes + Requests per second: 8795.848 [#/sec] (mean) + Time per request: 0.11369 [ms] (mean) + --------------------------------- + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D + HTTP agent: Apache HttpCore 4 (ver: 4.1-alpha2-SNAPSHOT) + --------------------------------- + 200000 GET requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) + = + Document URI: http://localhost:54406/rnd?c=3D2048 + Document Length: 2048 bytes + = + Time taken for tests: 13.339 seconds + Complete requests: 200000 + Failed requests: 0 + Content transferred: 409600000 bytes + Requests per second: 14993.628 [#/sec] (mean) + Time per request: 0.066695 [ms] (mean) + --------------------------------- + 200000 POST requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) + = + Document URI: http://localhost:54406/echo + Document Length: 2048 bytes + = + Time taken for tests: 15.183 seconds + Complete requests: 200000 + Failed requests: 0 + Content transferred: 409600000 bytes + Requests per second: 13172.628 [#/sec] (mean) + Time per request: 0.075915 [ms] (mean) + --------------------------------- + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D + HTTP agent: Apache HttpClient 4 (ver: 4.1-alpha2-SNAPSHOT) + --------------------------------- + 200000 GET requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) + = + Document URI: http://localhost:54406/rnd?c=3D2048 + Document Length: 2048 bytes + = + Time taken for tests: 17.004 seconds + Complete requests: 200000 + Failed requests: 0 + Content transferred: 409600000 bytes + Requests per second: 11761.938 [#/sec] (mean) + Time per request: 0.08502 [ms] (mean) + --------------------------------- + 200000 POST requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) + = + Document URI: http://localhost:54406/echo + Document Length: 2048 bytes + = + Time taken for tests: 18.493 seconds + Complete requests: 200000 + Failed requests: 0 + Content transferred: 409600000 bytes + Requests per second: 10814.903 [#/sec] (mean) + Time per request: 0.092465 [ms] (mean) + --------------------------------- + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D + HTTP agent: Jetty 7.0.1.v20091125 + --------------------------------- + 200000 GET requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) + = + Document URI: http://localhost:54406/rnd?c=3D2048 + Document Length: 2048 bytes + = + Time taken for tests: 22.116 seconds + Complete requests: 200000 + Failed requests: 0 + Content transferred: 409600000 bytes + Requests per second: 9043.227 [#/sec] (mean) + Time per request: 0.11058 [ms] (mean) + --------------------------------- + 200000 POST requests + = + [The test did not complete after several minutes and was terminated] + }}} + = + =3D=3D=3D Windows Vista / JRE 1.6 =3D=3D=3D + = + {{{ + java version "1.6.0_18" + Java(TM) SE Runtime Environment (build 1.6.0_18-b07) - Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing) + Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing) }}} = - =3D=3D=3D Test settings =3D=3D=3D - = {{{ - 200,000 HTTP GETs, keep alive, content length: 689 bytes - }}} + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D + HTTP agent: Apache HttpClient 3.1 + --------------------------------- + 200000 GET requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) = + Document URI: http://localhost:49640/rnd?c=3D2048 - =3D=3D=3D Test results =3D=3D=3D - = - * !HttpClient 3.x - = - {{{ - Server Software: Apache-Coyote/1.1 - = - Document URI: http://localhost:8080/examples/servlets/servlet/RequestInf= oExample - Document Length: 689 bytes + Document Length: 2048 bytes = - Time taken for tests: 36.099 seconds + Time taken for tests: 44.74 seconds Complete requests: 200000 Failed requests: 0 - Content transferred: 137800000 bytes + Content transferred: 409600000 bytes + Requests per second: 4470.2725 [#/sec] (mean) + Time per request: 0.2237 [ms] (mean) + --------------------------------- + 200000 POST requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) + = + Document URI: http://localhost:49640/echo + Document Length: 2048 bytes + = + Time taken for tests: 42.058 seconds + Complete requests: 200000 + Failed requests: 0 + Content transferred: 410744936 bytes - Requests per second: 5540.32 [#/sec] (mean) + Requests per second: 4755.338 [#/sec] (mean) - Time per request: 0.180495 [ms] (mean) + Time per request: 0.21029 [ms] (mean) - }}} + --------------------------------- + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D + HTTP agent: JRE HTTP 1.6.0_18 + --------------------------------- + 200000 GET requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) = + Document URI: http://localhost:49640/rnd?c=3D2048 - * !HttpClient 4.x - = - {{{ - Server Software: Apache-Coyote/1.1 - = - Document URI: http://localhost:8080/examples/servlets/servlet/RequestInf= oExample - Document Length: 689 bytes + Document Length: 2048 bytes = - Time taken for tests: 35.381 seconds + Time taken for tests: 43.321 seconds Complete requests: 200000 Failed requests: 0 - Content transferred: 137800000 bytes + Content transferred: 409600000 bytes - Requests per second: 5652.7515 [#/sec] (mean) + Requests per second: 4616.6987 [#/sec] (mean) - Time per request: 0.176905 [ms] (mean) + Time per request: 0.216605 [ms] (mean) - }}} + --------------------------------- + 200000 POST requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) = + Document URI: http://localhost:49640/echo - * !HttpCore 4.x - = - {{{ - Server Software: Apache-Coyote/1.1 - = - Document URI: http://localhost:8080/examples/servlets/servlet/RequestInf= oExample - Document Length: 689 bytes + Document Length: 2048 bytes = - Time taken for tests: 26.505 seconds + Time taken for tests: 42.635 seconds Complete requests: 200000 Failed requests: 0 + Content transferred: 412422664 bytes + Requests per second: 4690.982 [#/sec] (mean) + Time per request: 0.213175 [ms] (mean) + --------------------------------- + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D + HTTP agent: Apache HttpCore 4 (ver: 4.1-alpha2-SNAPSHOT) + --------------------------------- + 200000 GET requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) + = + Document URI: http://localhost:49640/rnd?c=3D2048 + Document Length: 2048 bytes + = + Time taken for tests: 34.18 seconds + Complete requests: 200000 + Failed requests: 0 - Content transferred: 137800000 bytes + Content transferred: 409600000 bytes - Requests per second: 7545.746 [#/sec] (mean) + Requests per second: 5851.375 [#/sec] (mean) + Time per request: 0.1709 [ms] (mean) + --------------------------------- + 200000 POST requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) + = + Document URI: http://localhost:49640/echo + Document Length: 2048 bytes + = + Time taken for tests: 30.685 seconds + Complete requests: 200000 + Failed requests: 0 + Content transferred: 410032512 bytes + Requests per second: 6517.843 [#/sec] (mean) - Time per request: 0.132525 [ms] (mean) + Time per request: 0.153425 [ms] (mean) - }}} + --------------------------------- + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D + HTTP agent: Apache HttpClient 4 (ver: 4.1-alpha2-SNAPSHOT) + --------------------------------- + 200000 GET requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) = + Document URI: http://localhost:49640/rnd?c=3D2048 - * HTTP JRE - = - {{{ - Server Software: Apache-Coyote/1.1 - = - Document URI: http://localhost:8080/examples/servlets/servlet/RequestInf= oExample - Document Length: 689 bytes + Document Length: 2048 bytes = - Time taken for tests: 32.792 seconds + Time taken for tests: 43.805 seconds Complete requests: 200000 Failed requests: 0 - Content transferred: 137800000 bytes + Content transferred: 409600000 bytes - Requests per second: 6099.0483 [#/sec] (mean) + Requests per second: 4565.689 [#/sec] (mean) - Time per request: 0.16396 [ms] (mean) + Time per request: 0.219025 [ms] (mean) - }}} + --------------------------------- + 200000 POST requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) = + Document URI: http://localhost:49640/echo + Document Length: 2048 bytes + = + Time taken for tests: 42.385 seconds + Complete requests: 200000 + Failed requests: 0 + Content transferred: 409846776 bytes + Requests per second: 4718.651 [#/sec] (mean) + Time per request: 0.211925 [ms] (mean) + --------------------------------- + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D + HTTP agent: Jetty 7.0.1.v20091125 + --------------------------------- + 200000 GET requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) + = + Document URI: http://localhost:49640/rnd?c=3D2048 + Document Length: 2048 bytes + = + Time taken for tests: 47.564 seconds + Complete requests: 200000 + Failed requests: 0 + Content transferred: 409600000 bytes + Requests per second: 4204.861 [#/sec] (mean) + Time per request: 0.23782 [ms] (mean) + --------------------------------- + 200000 POST requests + --------------------------------- + Server Software: Jetty(7.0.1.v20091125) + = + Document URI: http://localhost:49640/echo + Document Length: 2048 bytes + = + Time taken for tests: 45.115 seconds + Complete requests: 200000 + Failed requests: 0 + Content transferred: 410369976 bytes + Requests per second: 4433.115 [#/sec] (mean) + Time per request: 0.225575 [ms] (mean) + --------------------------------- + }}} +=20 --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org