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で動作していますが、
今まで、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かなりいい感じです。
後は、メモリ追加オプションがあれば、言うこと無いです。


 

Fedora14 on VMware Fusion on MacBook Air

先日のエントリーで、MacBook AirにFedoraをインストールしたことを書きましたが、
やはり、Mac OS X上からもLinuxを使いたいので試行錯誤して、
VMWare Fusion 3上から使うことができました。

以下、その方法。

まずは、普通に別パーティション(私の場合/dev/disk0s3(Mac表記))へFedora14(x86_64)をインストール。
なお、swapパーティションは、とりあえず作らない。必要なら後からswapファイルを作ってそれをswapにする。
(無駄なディスク領域は作りたくないので)
また、MacのUSキーボードの場合、キーボードは無印の「アメリカ合衆国」を選んだ方がいいようだ。
「日本語入力するから国際版(International)」かな?と思ってそれを選んだら、
「~, `, “, ‘」
などのキーがまともに入力できなくなってしまいました。

なお、設定は/etc/sysconfig/keyboardの

KEYBOARD="acentos-us"

となっているところを

KEYBOARD="us"

とすれば、普通のUSキーボードになるようです。
2011/02/08追記:
==========
どうやらこれではダメだったみたいです。。もうちょっと解決策を探してみます。
==========

で、肝心の別パーティションのディスクイメージを使用してのLinux起動ですが、
以下の手順でできました。
なお、http://fearandloath.us/vmware-fusion-bootcamp-partition.htmlのサイトの情報を
参考(というかほぼそのまま)にさせてもらいました。

$ cd "/Library/Application Support/VMware Fusion/"
$ ./vmware-rawdiskCreator print /dev/disk0
Nr      Start       Size Type Id Sytem
-- ---------- ---------- ---- -- ------------------------
 1          1     409639 BIOS EE Unknown
 2     409640  196982744 BIOS AF HFS+
 3  197654528   39321600 BIOS 83 Linux
(という感じの出力がされるので、インストールするパーティションの「Nr」を確認しておく
私の場合は「3」)
$ ./vmware-rawdiskCreator create /dev/disk0 3 /Users/igawa/Documents/Virtual\ Machines.localized/rawfedora_x86_64.vmwarevm/bootcamp_partition ide
$ vim /Users/igawa/Documents/Virtual\ Machines.localized/rawfedora_x86_64.vmwarevm/rawfedora_x86_64.vmx
======
ide0:0.present = "TRUE"
ide0:0.fileName = "bootcamp_partition.vmdk"
======
を適当なところに追加 or 置換する。

これでOKでした。

 

MacBook AirにLinuxをインストールした。

Fedora14 on MacBook Air

参考にしたページは、
http://d.hatena.ne.jp/masami256/20110115/1295104000
です。

ただ、私の場合、どうやってもUSBメモリからのブートがうまくいかず、
以下の、USB接続のDVDドライブを購入しました。

また、Fedora14ではデフォルトでは無線LANのドライバもうまく動作しないらしいので、合わせて以下も購入しました。

どちらのデバイスも特に問題なく動作し、インストール出来ました。

 

Ubuntuのデフォルトエディタはnanoというやつですが、
操作方法がさっぱりわからんので、vimに変更します。
参考にしたサイトは、
Ubuntu のデフォルトエディタを nano から vim に変更する方法」です。

まずは、vimのインストールから。

$ sudo apt-get install vim
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
以下の特別パッケージがインストールされます:
  vim-runtime
提案パッケージ:
  ctags vim-doc vim-scripts
以下のパッケージが新たにインストールされます:
  vim vim-runtime
アップグレード: 0 個、新規インストール: 2 個、削除: 0 個、保留: 10 個。
6,563kB のアーカイブを取得する必要があります。
この操作後に追加で 27.1MB のディスク容量が消費されます。
続行しますか [Y/n]?
取得:1 http://jp.archive.ubuntu.com/ubuntu/ maverick/main vim-runtime all 2:7.2.330-1ubuntu4 [5,707kB]
取得:2 http://jp.archive.ubuntu.com/ubuntu/ maverick/main vim i386 2:7.2.330-1ubuntu4 [856kB]
6,563kB を 4秒 で取得しました (1,315kB/s)
未選択パッケージ vim-runtime を選択しています。
(データベースを読み込んでいます ... 現在 153356 個のファイルとディレクトリがインストールされています。)
(.../vim-runtime_2%3a7.2.330-1ubuntu4_all.deb から) vim-runtime を展開しています...
Adding 'diversion of /usr/share/vim/vim72/doc/help.txt to /usr/share/vim/vim72/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim72/doc/tags to /usr/share/vim/vim72/doc/tags.vim-tiny by vim-runtime'
未選択パッケージ vim を選択しています。
(.../vim_2%3a7.2.330-1ubuntu4_i386.deb から) vim を展開しています...
man-db のトリガを処理しています ...
vim-runtime (2:7.2.330-1ubuntu4) を設定しています ...
Processing /usr/share/vim/addons/doc
vim (2:7.2.330-1ubuntu4) を設定しています ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode.

そして、update-alternativesコマンドで変更。

$ sudo update-alternatives --config editor
There are 4 choices for the alternative editor (providing /usr/bin/editor).

  Selection    Path                優        Status
------------------------------------------------------------
* 0            /bin/nano            40        auto mode
  1            /bin/ed             -100       manual mode
  2            /bin/nano            40        manual mode
  3            /usr/bin/vim.basic   30        manual mode
  4            /usr/bin/vim.tiny    10        manual mode

Press enter to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in manual mode.
 

UbuntuでKernelをビルドしたくなり、そのときのメモ。
http://dogmap.jp/2009/06/19/rebuild-kernel/
を、参考に(ほぼそのままですが)しました。

/*** カーネル再構築に必要なパッケージをインストール ***/
$ sudo apt-get install build-essential
$ sudo apt-get install kernel-package libncurses5-dev libqt3-mt-dev
$ sudo apt-get install git git-core
$ sudo apt-get install fakeroot

/*** カーネルソースをインストールして展開 ***/
$ mkdir ~/src; cd src
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

/*** .config ファイルの作成 ***/
$ cd linux-2.6
$ cp /boot/config-2.6.35-xx-generic .config

/*** 好きなconfigをONにする。今回は、LGUESTと
例のミラクルパッチwをONにしてみた

http://gihyo.jp/admin/clip/01/linux_dt/201011/18

 ***/
$ make menuconfig

/*** カーネルのリビルド ***/
$ fakeroot make-kpkg clean
$ fakeroot make-kpkg --initrd --revision=.20110121 kernel_image kernel_headers

今はここまで。これが終わったら、以下を実行予定。

/*** .deb ができるので dpkg でインストール ***/
$ cd ..
$ dpkg -i linux-image-2.6.38.xx_20110121_x86.deb

# スクリプト化しよう。。

(2011/01/30追記)だったが、うまくいかなかった。。が、
試行錯誤し、以下のようなパッチをあててなんとかできるようになった。

--- /usr/share/kernel-package/ruleset/kernel_version.mk.orig	2008-05-02 07:06:28.000000000 +0200
+++ /usr/share/kernel-package/ruleset/kernel_version.mk	2010-07-08 00:02:45.316669641 +0200
@@ -62,7 +62,7 @@
  @echo "$(strip $(EXTRAVERSION))"

 debian_LOCALVERSION:
-	@echo $(if $(strip $(localver-full)),"$(strip $(localver-full))", "$(strip $(LOCALVERSION))")
+	@./scripts/setlocalversion

 debian_TOPDIR:
 # 2.6 kernels declared TOPDIR obsolete, so use srctree if it exists

参考サイト:http://d.hatena.ne.jp/kinneko/20110111/p53

 

IMAG0001.jpg

下りが1Mbps以上出ました!スゴい。
今後もこのスピードが維持されるのだろうか?

1月 162011
 

ドコモのパケット料金が高いので、イー・モバイルを契約しました。
端末はHTC Ariaにしました。
Pocket WiFi Sも、選択肢にありましたが、
実際に店頭で触ってみると、HTC Ariaの方がいい感じに動いたので。

で、実際の使った感覚ですが、
CPUはXperiaに劣るはずなんですが、使った感じは(かなり)Aria優勢です。
今後使い込んでいくと、また違った感じになるかも知れませんが、
今のところは、かなりのさくさく具合で、満足です。

これから、テザリングを試してみます。