13日に書いたDTIの仮想サーバーサービスServersMan@VPSの続き。
rewriteがうまくいってないっぽいというところで行き詰まっていたのだが、それ以前に.htaccessが効いていない事に気付いたので、/etc/httpd/conf/httpd.confに
<Directory /home/*/public_html>
AllowOverride All
</Directory>
を設定することで解決した。
<public_html>の設定は最初にUserDirディレクティブと一緒にやったはずだったが、何かの契機でundoしてしまったのかなぁ。
一通り落ち着いたところでApacheBenchをやってみたところ、結果は以下の通り。
[yano@vps ~]$ ab -n 100 -c 10 http://localhost/~yano/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient).....done
Server Software: Apache/2.2.3
Server Hostname: localhost
Server Port: 80
Document Path: /~yano/
Document Length: 34657 bytes
Concurrency Level: 10
Time taken for tests: 17.903715 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 3494200 bytes
HTML transferred: 3465700 bytes
Requests per second: 5.59 [#/sec] (mean)
Time per request: 1790.372 [ms] (mean)
Time per request: 179.037 [ms] (mean, across all concurrent requests)
Transfer rate: 190.57 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 6 19.8 0 69
Processing: 68 1738 1806.5 1341 10602
Waiting: 0 1670 1817.4 1192 10597
Total: 69 1744 1802.0 1341 10602
Percentage of the requests served within a certain time (ms)
50% 1341
66% 1723
75% 2041
80% 2349
90% 2732
95% 7503
98% 9350
99% 10602
100% 10602 (longest request)
[yano@vps ~]$
"Percentage of the requests served within a certain time (ms)"を診ると75%は2秒以内に応答できているようだが、最後の5%は7.5秒以上かかっているというのが気になる。
試しにCeleron 1.3GHzの現行サーバnx9030でもやってみると
[yano@nx9030 ~]$ ab -n 100 -c 10 http://localhost/~yano/
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: Apache/2.0.52
Server Hostname: localhost
Server Port: 80
Document Path: /~yano/
Document Length: 34829 bytes
Concurrency Level: 10
Time taken for tests: 21.835024 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 3614164 bytes
HTML transferred: 3587384 bytes
Requests per second: 4.58 [#/sec] (mean)
Time per request: 2183.502 [ms] (mean)
Time per request: 218.350 [ms] (mean, across all concurrent requests)
Transfer rate: 161.62 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 31 132.4 0 814
Processing: 549 2035 860.7 1860 4350
Waiting: 232 1506 798.3 1408 4208
Total: 549 2066 866.2 1884 4426
Percentage of the requests served within a certain time (ms)
50% 1884
66% 2357
75% 2590
80% 2747
90% 3432
95% 3846
98% 4352
99% 4426
100% 4426 (longest request)
[yano@nx9030 ~]$
なので、
/proc/cpuinfoでは「Intel(R) Xeon(R) CPU L5520 @ 2.27GHz」と出力されるものの、
ServersMan@VPSはシングルコアのCeleron 1.3GHzより少し速い程度。
"Percentage of the requests served within a certain time (ms)"も50%の応答時間は
ServersMan@VPSの方が良好なので、極端に時間がかかっているケースは契約プランのメモリ容量を増やすことで改善されるんじゃないかしら?
というわけで、1000/日hit程度の個人サイトや実験ユースとしてはServersMan@VPSでも充分だが、決して高いパフォーマンスではないので真面目に業務で使おうとする向きには厳しいかもねぇ。
参考まで7月に導入したCeleron G1101 2.26GHz Dual Coreの新鋭機GT110bと比較すると…
yano@GT110b:~$ ab -n 100 -c 10 http://localhost/~yano/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient).....done
Server Software: Apache/2.2.14
Server Hostname: localhost
Server Port: 80
Document Path: /~yano/
Document Length: 34625 bytes
Concurrency Level: 10
Time taken for tests: 3.207 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 3491900 bytes
HTML transferred: 3462500 bytes
Requests per second: 31.18 [#/sec] (mean)
Time per request: 320.669 [ms] (mean)
Time per request: 32.067 [ms] (mean, across all concurrent requests)
Transfer rate: 1063.42 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 3 11.7 0 57
Processing: 148 312 49.5 308 406
Waiting: 139 264 48.3 262 370
Total: 148 315 50.6 309 406
Percentage of the requests served within a certain time (ms)
50% 309
66% 342
75% 359
80% 371
90% 381
95% 392
98% 401
99% 406
100% 406 (longest request)
yano@GT110b:~$
なので、2万円もしない
GT110bの圧勝という事になると、コストパフォーマンスだけで仮想化が有利とばかりも言えないのだなぁ。
【参照】
●R2.ag http://r2.ag/
┗格安VPSの比較「ServersMan@VPS」と「さくらのVPS」(2010/9/1時点) 2010年9月1日
●ServersMan@VPS仮想専用サーバーサービス:ユビキタスプロバイダ DTI http://dream.jp/vps/
┗ServersMan@VPS仮想専用サーバーサービス キャンペーン