先日のエントリーで書いたさくらのVPSの上位プランへのアップグレードについて、

簡単に容量アップできるのかな。。?

と、書いたのですが、さくらのVPSページには特に何も書いてなかったので、
問い合わせてみました。

で、得られた回答が以下の通り。

大変恐れ入りますが、「さくらのVPSシリーズ」では、収容サーバが
異なる為、プラン変更やアップグレードのお手続きがございません。

ご希望のサービスを新規でお申し込みいただき、お客様にてサーバの構築や
データ等の移行作業を行われた後、不要なサービスの解約を頂く対応と
なっております。

ご希望に沿えず申し訳ございませんが、ご了承賜りますようお願いいたします。

プラン変更/アップグレードができないというのは
ちょっとガッカリですが、まぁサーバ自体に特に不満はないので、
その内移行したいと思います。





 

result of sakura vps benchmark

と、いうわけで以下結果です。

スコアとしては、1256.5。こんなもんなんでしょうか。

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: 0r2.info: GNU/Linux
   OS: GNU/Linux -- 2.6.38-rc4-00106-gd247852 -- #1 SMP Sat Feb 12 05:11:57 JST 2011
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz (5320.3 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   CPU 1: Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz (5320.3 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   05:26:55 up 18 days, 15:23,  1 user,  load average: 0.02, 0.04, 0.05; runlevel 3

------------------------------------------------------------------------
Benchmark Run: 金  3月 04 2011 05:26:55 - 05:54:56
2 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       23992196.0 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     3085.0 MWIPS (9.1 s, 7 samples)
Execl Throughput                               1307.9 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        441004.0 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          122297.6 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        992115.9 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1037608.4 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 145308.5 lps   (10.0 s, 7 samples)
Process Creation                               3073.2 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   2637.8 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    652.9 lpm   (60.1 s, 2 samples)
System Call Overhead                        1429308.8 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   23992196.0   2055.9
Double-Precision Whetstone                       55.0       3085.0    560.9
Execl Throughput                                 43.0       1307.9    304.2
File Copy 1024 bufsize 2000 maxblocks          3960.0     441004.0   1113.6
File Copy 256 bufsize 500 maxblocks            1655.0     122297.6    739.0
File Copy 4096 bufsize 8000 maxblocks          5800.0     992115.9   1710.5
Pipe Throughput                               12440.0    1037608.4    834.1
Pipe-based Context Switching                   4000.0     145308.5    363.3
Process Creation                                126.0       3073.2    243.9
Shell Scripts (1 concurrent)                     42.4       2637.8    622.1
Shell Scripts (8 concurrent)                      6.0        652.9   1088.2
System Call Overhead                          15000.0    1429308.8    952.9
                                                                   ========
System Benchmarks Index Score                                         731.7

------------------------------------------------------------------------
Benchmark Run: 金  3月 04 2011 05:54:56 - 06:23:16
2 CPUs in system; running 2 parallel copies of tests

Dhrystone 2 using register variables       45446984.0 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     6064.6 MWIPS (9.5 s, 7 samples)
Execl Throughput                               3794.6 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        465812.5 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          134853.9 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1176253.0 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1914346.3 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 272961.3 lps   (10.0 s, 7 samples)
Process Creation                               9831.0 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   5213.8 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    744.4 lpm   (60.1 s, 2 samples)
System Call Overhead                        2521800.8 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   45446984.0   3894.3
Double-Precision Whetstone                       55.0       6064.6   1102.7
Execl Throughput                                 43.0       3794.6    882.5
File Copy 1024 bufsize 2000 maxblocks          3960.0     465812.5   1176.3
File Copy 256 bufsize 500 maxblocks            1655.0     134853.9    814.8
File Copy 4096 bufsize 8000 maxblocks          5800.0    1176253.0   2028.0
Pipe Throughput                               12440.0    1914346.3   1538.9
Pipe-based Context Switching                   4000.0     272961.3    682.4
Process Creation                                126.0       9831.0    780.2
Shell Scripts (1 concurrent)                     42.4       5213.8   1229.7
Shell Scripts (8 concurrent)                      6.0        744.4   1240.7
System Call Overhead                          15000.0    2521800.8   1681.2
                                                                   ========
System Benchmarks Index Score                                        1256.5
 

さくらのVPSでベンチマークをやってみた。

$ wget http://byte-unixbench.googlecode.com/files/UnixBench5.1.3.tgz
--2011-03-04 05:12:00--  http://byte-unixbench.googlecode.com/files/UnixBench5.1.3.tgz
byte-unixbench.googlecode.com をDNSに問いあわせています... 64.233.183.82
byte-unixbench.googlecode.com|64.233.183.82|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 143259 (140K) [application/x-gzip]
`UnixBench5.1.3.tgz' に保存中

100%[======================================>] 143,259      203K/s 時間 0.7s    

2011-03-04 05:12:06 (203 KB/s) - `UnixBench5.1.3.tgz' へ保存完了 [143259/143259]

$ tar xf UnixBench5.1.3.tgz
$ make
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./results  exists
gcc -o ./pgms/arithoh -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Darithoh ./src/arith.c
(中略)
gcc -o ./pgms/whetstone-double -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -DDP -DUNIX -DUNIXBENCH ./src/whets.c -lm
$ echo $?
0
$ ./Run
make all
make[1]: Entering directory `/home/masayuki/src/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./tmp  exists
./results  exists
make[1]: Leaving directory `/home/masayuki/src/UnixBench'
sh: 3dinfo: command not found

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #

   Version 5.1.3                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   January 13, 2011                   johantheghost at yahoo period com

1 x Dhrystone 2 using register variables  1

で、しばらく待つ。
なかなか終わらないので、続きは後日。

 

「さくらのVPS」に待望の上位プランが追加されるようです。

私は1GBにしたいと思っています。
でも、簡単に容量アップできるのかな。。?

 

このサイトのサーバは、さくらのVPSで動作していますが、
今まで、CentOS5だったのを、Fedora14に変更しました。



以下、その時につまずいたところなどを、記してみたいと思います。

OSのインストール自体は、
カスタムOSインストールガイド : Fedora 13に従って行えば、特に困るところは無いと思います。

ただし、私の環境だと、
「[STEP 13] VPSの停止と起動」で、VNCコンソール(QEMUコンソール)の
ウィンドウが消えてしまうことがあったのですが、その場合には、
VPSコントロールパネルのリモートコンソール
sakura vps remote console
の、「VNCコンソールを開く」をやれば大丈夫だと思います。

また、「[STEP 10] インストールタイプの選択」では、私は「Webサーバ」を選択しました。
特に問題はありません。

Fedora13がインストールできたら、次は、このブログ記事のタイトル
「Fedora14」へアップグレードします。(まだ道半ばです(笑))

Fedora14のインストールは簡単です。

あたりの記事を参考に、アップグレードします。

要は、

# yum update rpm
# yum -y update
# yum clean all
# reboot

てな感じで、ひとまず(Fedora13の)最新版にしておき、

preupgradeをインストール。(既にインストールされている場合もあり)

# yum install preupgrade

preupgrade-cliを実行。

# LANG=C preupgrade-cli "Fedora 14 (Laughlin)"

LANG=Cで実行しないと、エラーが発生するらしいです。

で、これでFedora14になりました。

あとは、必要な設定を随時行っていきます。
ちょっとつまずいたのは、パーマリンクの設定。

以下のように、httpd.confのAllowOverride NoneをAllowOverride Allに
変更してやる必要がありました。
パーマリンクの使い方:その他の問題点

また、Webサーバとして使うので、GUIでのログインは不要なので、
/etc/inittabを以下のように変更し、ランレベル3で動作するようにします。

diff --git a/inittab b/inittab
index a8ab066..b6a0b26 100644
--- a/inittab
+++ b/inittab
@@ -23,4 +23,5 @@
 #   5 - X11
 #   6 - reboot (Do NOT set initdefault to this)
 #
-id:5:initdefault:
+#id:5:initdefault:
+id:3:initdefault:

また、不要なサービス(bluetooth, pcscd, cups)あたりを、

$ sudo chkconfig サービス名 off

で、起動しないようにしました。

また、メモリが少ないので、デフォルトのhttpd設定だと、オーバースペックで、
メモリを圧迫し、動作が遅くなるので、設定値をしぼります。

@@ -98,12 +101,12 @@ KeepAliveTimeout 15
 # MaxClients: maximum number of server processes allowed to start
 # MaxRequestsPerChild: maximum number of requests a server process serves
 <IfModule prefork.c>
-StartServers       8
-MinSpareServers    5
-MaxSpareServers   20
-ServerLimit      256
-MaxClients       256
-MaxRequestsPerChild  4000
+StartServers       4
+MinSpareServers    3
+MaxSpareServers    5
+ServerLimit       64
+MaxClients        64
+MaxRequestsPerChild  2000
 </IfModule>

 # worker MPM
@@ -115,10 +118,10 @@ MaxRequestsPerChild  4000
 # MaxRequestsPerChild: maximum number of requests a server process serves
 <IfModule worker.c>
 StartServers         2
-MaxClients         150
-MinSpareThreads     25
-MaxSpareThreads     75
-ThreadsPerChild     25
+MaxClients          50
+MinSpareThreads      5
+MaxSpareThreads     10
+ThreadsPerChild      9
 MaxRequestsPerChild  0
 </IfModule>

自由度の高い、さくらVPSかなりいい感じです。
後は、メモリ追加オプションがあれば、言うこと無いです。


 

と言うわけで、さっそく準備ができたようなので比較してみたいと思います。
以下、計測ログ等。

お名前.comサーバ:

onamaeVPS $ grep processor /proc/cpuinfo |wc -l
16
onamaeVPS $ time for ((i=0; i<100000; i++)); do :; done

real	0m0.726s
user	0m0.381s
sys	0m0.345s
onamaeVPS $ time for ((i=0; i<100000; i++)); do :; done

real	0m0.842s
user	0m0.422s
sys	0m0.420s
onamaeVPS $ time for ((i=0; i<100000; i++)); do :; done

real	0m0.787s
user	0m0.257s
sys	0m0.530s
onamaeVPS $ grep -e MemTotal -e Swap /proc/meminfo
MemTotal:      1048576 kB
SwapCached:          0 kB
SwapTotal:           0 kB
SwapFree:            0 kB
onamaeVPS $ df -T
Filesystem    Type   1K-ブロック    使用   使用可 使用% マウント位置
/dev/vzfs     vzfs   124780544  17436724 107343820  14% /
none         tmpfs      524288         4    524284   1% /dev
onamaeVPS $ uname -a
Linux 0r2.info 2.6.18-028stab068.9 #1 SMP Tue Mar 30 17:22:31 MSD 2010 x86_64 x86_64 x86_64 GNU/Linux
onamaeVPS $ cat /etc/redhat-release
CentOS release 5.5 (Final)

さくらVPS:

sakuraVPS $ grep processor /proc/cpuinfo |wc -l
2
sakuraVPS $ time for ((i=0; i<100000; i++)); do :; done

real	0m0.497s
user	0m0.486s
sys	0m0.010s
sakuraVPS $ time for ((i=0; i<100000; i++)); do :; done

real	0m0.491s
user	0m0.478s
sys	0m0.013s
sakuraVPS $ time for ((i=0; i<100000; i++)); do :; done

real	0m0.576s
user	0m0.568s
sys	0m0.008s
sakuraVPS $ grep -e MemTotal -e Swap /proc/meminfo
MemTotal:       510532 kB
SwapCached:          0 kB
SwapTotal:     2048276 kB
SwapFree:      2048276 kB
sakuraVPS $ df -T
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
/dev/hda2     ext3    18222732   1861328  15420800  11% /
/dev/hda1     ext3      101086     17861     78006  19% /boot
tmpfs        tmpfs      255264         0    255264   0% /dev/shm
sakuraVPS $ uname -a
Linux www5296u.sakura.ne.jp 2.6.18-194.8.1.el5 #1 SMP Thu Jul 1 19:04:48 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
sakuraVPS $ cat /etc/redhat-release
CentOS release 5.5 (Final)

というわけで、ざっくり評価まとめは以下のような感じ。

  1. CPU数はお名前.comの方が上(8倍)
  2. メモリ量はお名前.comの方が上(2倍)
  3. ディスク容量はお名前.comの方が上(6倍以上)

と、ここまではお名前.comのアドバンテージですが、
さくらVPSは、

  1. 実動作スピードはさくらVPSの方が上(50%以上高速)
  2. Swapが使える分、ちょっと気楽(必要ならもっとswapを足せば良い)
  3. 安い!(お名前.comの半額以下)

というアドバンテージがあります。

どちらが良いかはケースバイケースですが、
私はさくらVPSをもうちょっと使ってみようかと考えています。

VPSが気になる方は、以下からどうぞ。




 

さくらのVPSが月額980ということなので、使ってみることにします。
何に惹かれたのか?というと、KVMを使っているからです。
現在は、お名前.comを使っていて大きな不満はないのですが、以下が気になっています。

  • Virtuozzoで、SWAPが使えない(すぐにOOM発生)
  • 月額料金が高い(その代わり、それに見合う快適度合いだとは思いますが。

どっちが良いのか、これから使って比較してみます。



 

現在、このサイトはお名前.comのVPS上で動作しているが、
DTIのServersMan VPSが期間限定ながら無料で試せるようだったので、
試してみた。

結論から言うと、お名前.comの方が私は好みです。
お名前.com VPS:x86_64カーネル、CPU:16コア、(下記の単純なベンチマークで)2倍程度早い
DTI VPS:x86カーネル、CPU:2コア、お名前.comの半分程度のスピード

というわけで、お名前.comのVPSを使ってみようと思った方は、
下記のリンクから、どうぞお申し込みください。

以下、計測ログ等。

お名前.comサーバ

$ grep processor /proc/cpuinfo |wc -l
16
$ time for ((i=0; i<100000; i++)); do :; done

real    0m0.640s
user    0m0.187s
sys     0m0.453s
$ time for ((i=0; i<100000; i++)); do :; done

real    0m0.641s
user    0m0.187s
sys     0m0.454s
$ time for ((i=0; i<100000; i++)); do :; done

real    0m0.780s
user    0m0.359s
sys     0m0.421s
$ uname -a
Linux 0r2.info 2.6.18-028stab068.9 #1 SMP Tue Mar 30 17:22:31 MSD 2010 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/redhat-release
CentOS release 5.5 (Final)

DTI VPS

$ grep processor /proc/cpuinfo |wc -l
2
$ time for ((i=0; i<100000; i++)); do :; done

real    0m1.485s
user    0m1.065s
sys     0m0.382s
$ time for ((i=0; i<100000; i++)); do :; done

real    0m1.499s
user    0m1.074s
sys     0m0.383s
$ time for ((i=0; i<100000; i++)); do :; done

real    0m1.488s
user    0m1.045s
sys     0m0.405s

$
$ uname -a
Linux localhost 2.6.18-194.3.1.el5.028stab069.6 #1 SMP Wed May 26 18:31:05 MSD 2010 i686 i686 i386 GNU/Linux
$ cat /etc/redhat-release
CentOS release 5.5 (Final)