ノノログ

ホーム / ブログ / baserCMSのバージョン2系と3系でapache benchとってみたよ。(ベンチマーク)

baserCMSのバージョン2系と3系でapache benchとってみたよ。(ベンチマーク)

■ 最初に

この記事はbaserCMSアドベントカレンダー2013/12/17の記事ですよ!提督っ!
baserCMSってのが何なのか知らない人は公式サイトを見るとよい。

■ なんの記事?

タイトルの通りですが、baserCMSの過去メジャーバージョンと最新メジャーバージョンで
apache benchと利用して性能比較してみました。
 

■ なんでそんなことしたの?

2週間前にbaserCMSの1年半ぶりのメジャーバージョンアップとなるbaserCMS3が出ました。
その際に
 
今回、CakePHPのバージョンアップに伴うアーキテクチャの見直しが一番の大きな目的だった為、目新しい新機能はあまり多くないですが、テーマやプラグインを作成するにあたっての機能が強化されています。
その他にも、内部的に大幅な改善を行なっており、表示速度もフロントエンドが約200%、管理システムが150%の速度向上が確認されています。
 
って言っていたのでほんとなの?と思い、計測してみました。
 

■ 環境について

動作環境についてはさくらクラウドの下記スペックでやりました。
なるべく他からの影響が無いようにさらのサーバを準備しました。
必要なサービスはrpmでインストールしましたが、PHPのみソースからコンパイルしました。
 
 
さくらクラウド
プラン: 2Core-2GB
OS: CentOS6.4(アーカイブ利用)
ストレージ: SSD 20GB
ネットワーク: 共有セグメント(100Mbps)
 
# apachectl -v
Server version: Apache/2.2.15 (Unix)
 
# /usr/local/bin/php -v
PHP 5.5.7 (cli) (built: Dec 17 2013 20:29:08) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
 
# mysql
Server version: 5.1.71 Source distribution
 
apache benchを走らせたのは、会社の開発PCです。
MacOSX 10.8.5
CPU: 2.9GHz Core i7
Mem: 8GB
 
利用ソースコードはbaserCMSのGithubより持ってきました。
リビジョン: 946aec4cc1d68d380846aec34e64bbe806945bd1
 

■ 計測結果

トップページに対して、同時接続数20、リクエスト数300にて3回ずつやってみました。
果たして200%アップになってるのか・・・
 
.
.
.
 
おお、いい感じですね!
数値としては、以下です。
version times Requests per second
[#/sec] 
Time per request
[ms]
Transfer rate
[Kbytes/sec]
Connect
(mean)
Processing
(mean)
Waiting
(mean)
Total
(mean)
baserCMS2  1 10.97 1822.856 128.41 19 1777 1689 1797
  2 10.98 1820.813 128.55 20 1783 1688 1804
  3 11.66 1714.951 136.49 20 1686 1601 1706
baserCMS3 1 17.43 1147.627 207.21 20 1114 1027 1135
  2 18.66 1071.958 221.84 20 1041 959 1061
  3 18.46 1083.652 219.44 19 1052 964 1072
 
 
baserCMS2  平均 11.20 1786.21 131.15 19.67 1748.67 1659.33 1769.00
baserCMS3 平均 18.18 1101.08 216.16 19.67 1069.00 983.33 1089.33
結果 162.30% 162.22% 164.82% 100.00% 163.58% 168.75% 162.39%
 
結果として概ね160%のスピードアップになってます。かなり早くなってますね!
初期インストール状態でトップページのみの結果なので、記事が増えた時などは
また変わった結果になると思います。
 
2系から3系へのバージョンアップは公式よりサポート対象外としてますが、
実はマイグレーションツールをbaserCMSの作者であるエガシラリュウジさんが
発表しているので、やってみる価値はありますね。
 
Let's enjoy baserCMS!!
 
 
 

■ おまけ

WordPress3.8も同じ条件でベンチとってみました。
トップページのみの集計のため、正確ではないと思いますが、およそbaserCMS2と
同じくらいの結果になりましたね。
 
wordpres3.8 1 10.86 1841.536 83.08 19 1797 1447 1817
  2 10.94 1828.531 83.93 20 1781 1408 1801
  3 10.38 1925.933 79.44 20 1883 1471 1903
 
 

■ 測定結果補足

バージョン2、1回目。
ab -n 300 -c 20 http://bc2.example.com/
Benchmarking bc2.example.com (be patient)
Completed 100 requests
Completed 200 requests
Finished 300 requests


Server Software:        Apache/2.2.15
Server Hostname:        bc2.example.com
Server Port:            80

Document Path:          /
Document Length:        11639 bytes

Concurrency Level:      20
Time taken for tests:   27.342836 seconds
Complete requests:      300
Failed requests:        0
Write errors:           0
Total transferred:      3595800 bytes
HTML transferred:       3491700 bytes
Requests per second:    10.97 [#/sec] (mean)
Time per request:       1822.856 [ms] (mean)
Time per request:       91.143 [ms] (mean, across all concurrent requests)
Transfer rate:          128.41 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       19   19   1.5     20      35
Processing:   797 1777 433.9   1703    4430
Waiting:      777 1689 427.5   1612    4329
Total:        817 1797 434.1   1723    4452

Percentage of the requests served within a certain time (ms)
  50%   1723
  66%   1735
  75%   1745
  80%   1753
  90%   1795
  95%   2504
  98%   3842
  99%   4101
 100%   4452 (longest request)


■ 2回目
Benchmarking bc2.example.com (be patient)
Completed 100 requests
Completed 200 requests
Finished 300 requests


Server Software:        Apache/2.2.15
Server Hostname:        bc2.example.com
Server Port:            80

Document Path:          /
Document Length:        11639 bytes

Concurrency Level:      20
Time taken for tests:   27.312191 seconds
Complete requests:      300
Failed requests:        0
Write errors:           0
Total transferred:      3595800 bytes
HTML transferred:       3491700 bytes
Requests per second:    10.98 [#/sec] (mean)
Time per request:       1820.813 [ms] (mean)
Time per request:       91.041 [ms] (mean, across all concurrent requests)
Transfer rate:          128.55 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       19   20   2.5     20      42
Processing:   714 1783 131.0   1783    2009
Waiting:      694 1688 119.4   1686    1908
Total:        734 1804 131.0   1803    2029

Percentage of the requests served within a certain time (ms)
  50%   1803
  66%   1867
  75%   1896
  80%   1907
  90%   1951
  95%   1972
  98%   1996
  99%   2005
 100%   2029 (longest request)


■ 3回目
Benchmarking bc2.example.com (be patient)
Completed 100 requests
Completed 200 requests
Finished 300 requests


Server Software:        Apache/2.2.15
Server Hostname:        bc2.example.com
Server Port:            80

Document Path:          /
Document Length:        11639 bytes

Concurrency Level:      20
Time taken for tests:   25.724268 seconds
Complete requests:      300
Failed requests:        0
Write errors:           0
Total transferred:      3595800 bytes
HTML transferred:       3491700 bytes
Requests per second:    11.66 [#/sec] (mean)
Time per request:       1714.951 [ms] (mean)
Time per request:       85.748 [ms] (mean, across all concurrent requests)
Transfer rate:          136.49 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       19   20   1.5     20      33
Processing:  1439 1686  45.3   1687    1780
Waiting:     1418 1601  38.6   1599    1679
Total:       1459 1706  45.4   1708    1808

Percentage of the requests served within a certain time (ms)
  50%   1708
  66%   1727
  75%   1739
  80%   1744
  90%   1754
  95%   1762
  98%   1771
  99%   1786
 100%   1808 (longest request)



バージョン3、1回目。
Benchmarking bc3.example.com (be patient)
Completed 100 requests
Completed 200 requests
Finished 300 requests


Server Software:        Apache/2.2.15
Server Hostname:        bc3.example.com
Server Port:            80

Document Path:          /
Document Length:        11852 bytes

Concurrency Level:      20
Time taken for tests:   17.214407 seconds
Complete requests:      300
Failed requests:        0
Write errors:           0
Total transferred:      3653100 bytes
HTML transferred:       3555600 bytes
Requests per second:    17.43 [#/sec] (mean)
Time per request:       1147.627 [ms] (mean)
Time per request:       57.381 [ms] (mean, across all concurrent requests)
Transfer rate:          207.21 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       19   20   1.5     20      37
Processing:   569 1114 265.8   1065    2175
Waiting:      547 1027 253.1    976    2042
Total:        589 1135 266.0   1084    2197

Percentage of the requests served within a certain time (ms)
  50%   1084
  66%   1116
  75%   1127
  80%   1132
  90%   1152
  95%   2065
  98%   2102
  99%   2105
 100%   2197 (longest request)



 2回目
 Benchmarking bc3.example.com (be patient)
Completed 100 requests
Completed 200 requests
Finished 300 requests


Server Software:        Apache/2.2.15
Server Hostname:        bc3.example.com
Server Port:            80

Document Path:          /
Document Length:        11852 bytes

Concurrency Level:      20
Time taken for tests:   16.79373 seconds
Complete requests:      300
Failed requests:        0
Write errors:           0
Total transferred:      3653100 bytes
HTML transferred:       3555600 bytes
Requests per second:    18.66 [#/sec] (mean)
Time per request:       1071.958 [ms] (mean)
Time per request:       53.598 [ms] (mean, across all concurrent requests)
Transfer rate:          221.84 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       19   20   1.1     20      32
Processing:   690 1041  60.3   1054    1159
Waiting:      670  959  48.4    967    1052
Total:        710 1061  60.2   1074    1178

Percentage of the requests served within a certain time (ms)
  50%   1074
  66%   1097
  75%   1107
  80%   1109
  90%   1122
  95%   1133
  98%   1147
  99%   1158
 100%   1178 (longest request)


 3回目
 Benchmarking bc3.example.com (be patient)
Completed 100 requests
Completed 200 requests
Finished 300 requests


Server Software:        Apache/2.2.15
Server Hostname:        bc3.example.com
Server Port:            80

Document Path:          /
Document Length:        11852 bytes

Concurrency Level:      20
Time taken for tests:   16.254780 seconds
Complete requests:      300
Failed requests:        0
Write errors:           0
Total transferred:      3653100 bytes
HTML transferred:       3555600 bytes
Requests per second:    18.46 [#/sec] (mean)
Time per request:       1083.652 [ms] (mean)
Time per request:       54.183 [ms] (mean, across all concurrent requests)
Transfer rate:          219.44 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       19   19   1.3     20      33
Processing:   602 1052  75.8   1064    1221
Waiting:      581  964  64.1    975    1101
Total:        622 1072  75.8   1083    1240

Percentage of the requests served within a certain time (ms)
  50%   1083
  66%   1108
  75%   1114
  80%   1122
  90%   1141
  95%   1171
  98%   1192
  99%   1212
 100%   1240 (longest request)



■ wordpress3.8 1回目
Benchmarking wp.example.com (be patient)
Completed 100 requests
Completed 200 requests
Finished 300 requests


Server Software:        Apache/2.2.15
Server Hostname:        wp.example.com
Server Port:            80

Document Path:          /
Document Length:        7616 bytes

Concurrency Level:      20
Time taken for tests:   27.623047 seconds
Complete requests:      300
Failed requests:        0
Write errors:           0
Total transferred:      2350200 bytes
HTML transferred:       2284800 bytes
Requests per second:    10.86 [#/sec] (mean)
Time per request:       1841.536 [ms] (mean)
Time per request:       92.077 [ms] (mean, across all concurrent requests)
Transfer rate:          83.08 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       19   19   1.3     20      26
Processing:   864 1797 241.3   1797    2770
Waiting:      620 1447 205.0   1436    2393
Total:        884 1817 241.3   1816    2789

Percentage of the requests served within a certain time (ms)
  50%   1816
  66%   1922
  75%   1938
  80%   1949
  90%   1972
  95%   2134
  98%   2236
  99%   2377
 100%   2789 (longest request)




2回目
 Benchmarking wp.example.com (be patient)
Completed 100 requests
Completed 200 requests
Finished 300 requests


Server Software:        Apache/2.2.15
Server Hostname:        wp.example.com
Server Port:            80

Document Path:          /
Document Length:        7616 bytes

Concurrency Level:      20
Time taken for tests:   27.427958 seconds
Complete requests:      300
Failed requests:        0
Write errors:           0
Total transferred:      2358034 bytes
HTML transferred:       2292416 bytes
Requests per second:    10.94 [#/sec] (mean)
Time per request:       1828.531 [ms] (mean)
Time per request:       91.427 [ms] (mean, across all concurrent requests)
Transfer rate:          83.93 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       19   20   1.1     20      31
Processing:   931 1781 150.7   1745    1978
Waiting:      867 1408  98.5   1390    1597
Total:        952 1801 150.8   1766    1998

Percentage of the requests served within a certain time (ms)
  50%   1766
  66%   1906
  75%   1925
  80%   1932
  90%   1950
  95%   1963
  98%   1980
  99%   1993
 100%   1998 (longest request)



 Benchmarking wp.example.com (be patient)
Completed 100 requests
Completed 200 requests
Finished 300 requests


Server Software:        Apache/2.2.15
Server Hostname:        wp.example.com
Server Port:            80

Document Path:          /
Document Length:        7616 bytes

Concurrency Level:      20
Time taken for tests:   28.888993 seconds
Complete requests:      300
Failed requests:        0
Write errors:           0
Total transferred:      2350200 bytes
HTML transferred:       2284800 bytes
Requests per second:    10.38 [#/sec] (mean)
Time per request:       1925.933 [ms] (mean)
Time per request:       96.297 [ms] (mean, across all concurrent requests)
Transfer rate:          79.44 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       19   20   1.6     20      35
Processing:  1301 1883 112.8   1895    2173
Waiting:     1180 1471  74.8   1474    1848
Total:       1323 1903 112.7   1915    2193

Percentage of the requests served within a certain time (ms)
  50%   1915
  66%   1950
  75%   1971
  80%   1979
  90%   2015
  95%   2048
  98%   2090
  99%   2104
 100%   2193 (longest request)
 

 

このエントリーをはてなブックマークに追加