Apr 12, 2006

Apache Web Server 2、lighttpd、JBossWeb のパフォーマンス比較

JBossWeb のパフォーマンス感が知りたくて、大雑把なパフォーマンス比較をしてみた。 それぞれインストールしただけの Apache Web Server 2、JBossWeb に JMeter で負荷をかけてみた。 また、ついでに lighttpd も試してみた。

テスト環境

  • Debian Sarge on VMWare Player
  • Kernel 2.6.8-2-386

テスト方法

  1. 各サーバのドキュメントルートに以下の "index.html" を作成する。
    <html>
    <head>
      <title>dummy page</title>
    </head>
    <body>
      This is a dummy page.
    </body>
    </html>
    
  2. JMeter で 1000 回程度 "/index.html" を GET する。(このときの結果は無視)
  3. JMeter でスレッド数 10、20、30、40、50 の状態で "/index.html" を 1000 回 GET し、パフォーマンスを計測する。

テスト結果

Apache Web Server 2

# /usr/sbin/apache2 -v
Server version: Apache/2.0.54
Server built:   Sep  5 2005 11:11:08
スレッド数 Samples Average Median 90% Line Min Max Error % Throughput KB/sec
10 10000 9 0 16 0 1734 0.00% 824.7/sec 78.93
20 20000 18 15 31 0 3562 0.00% 859.7/sec 82.27
30 30000 28 16 32 0 3609 0.00% 913.0/sec 87.38
40 40000 35 15 47 0 11078 0.00% 815.0/sec 78.00
50 50000 48 16 78 0 12218 0.00% 810.3/sec 77.55

lighttpd

# /usr/sbin/lighttpd -v
lighttpd-1.4.11 (ssl) - a light and fast webserver
Build-Date: Mar 27 2006 09:56:59
スレッド数 Samples Average Median 90% Line Min Max Error % Throughput KB/sec
10 10000 5 0 16 0 485 0.00% 1406.7/sec 134.62
20 20000 15 16 31 0 235 0.00% 1175.4/sec 112.49
30 30000 23 16 47 0 313 0.00% 1209.1/sec 115.71
40 40000 32 31 62 0 204 0.01% 1151.6/sec 110.32
50 50000 41 47 63 0 297 0.01% 1140.8/sec 109.27

Apache Web Server 2

# ./run.sh --version
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /opt/jbossweb

  JAVA: /opt/jdk15/bin/java

  JAVA_OPTS: -server -Xms128m -Xmx128m -Dprogram.name=run.sh

  CLASSPATH: /opt/jbossweb/bin/run.jar:/opt/jdk15/lib/tools.jar

=========================================================================

JBoss 4.0.4RC1 (build: CVSTag=JBoss_4_0_4_RC1 date=200602071519)

Distributable under LGPL license.
See terms of license at gnu.org.
スレッド数 Samples Average Median 90% Line Min Max Error % Throughput KB/sec
10 10000 10 0 16 0 625 0.00% 856.8/sec 81.99
20 20000 21 0 16 0 12984 0.00% 817.9/sec 78.27
30 30000 32 15 31 0 13750 0.00% 763.7/sec 73.09
40 40000 48 15 62 0 6703 0.00% 739.0/sec 70.73
50 50000 59 16 94 0 12922 0.00% 750.1/sec 71.79

Apache Tomcat 5.5

Apache Tomcat 5.5.16 の計測結果を以下に示す。

スレッド数 Samples Average Median 90% Line Min Max Error % Throughput KB/sec
10 10000 8 0 16 0 562 0.00% 959.5/sec 91.83
20 20000 19 0 16 0 10844 0.00% 888.9/sec 85.07
30 30000 28 0 16 0 20766 0.00% 901.0/sec 86.23
40 40000 36 0 16 0 8953 0.00% 886.4/sec 84.83
50 50000 51 0 16 0 12844 0.00% 866.7/sec 82.95

まとめ

未チューニング状態では、JBossWeb のパフォーマンスは Apache Web Server 2 より多少遅いレベルの様だ。 当然ながら Apache Tomcat とも大差ない結果となっている。 それにしても、lighttpd は light と銘打つだけあって流石に速い。 それにしても、Apache Web Server 2 が JBossWeb や Apache Tomcat と同等だったのが意外だった。 もう少し速いイメージがあったのだけれど。

[Throughput]
[KB/sec]

TrackBack ping me at
http://www.in-vitro.jp/blog/index.cgi/AS/20060412_01.trackback
Post a comment

writeback message: Ready to post a comment.