2009年12月30日水曜日

Smart Array P410の設定をいじってみるメモ その1

Smart Array P410i in Slot 0 (Embedded)
Bus Interface: PCI
Slot: 0
Serial Number:
Cache Serial Number:
RAID 6 (ADG) Status: Disabled
Controller Status: OK
Chassis Slot:
Hardware Revision: Rev C
Firmware Version: 2.72
Rebuild Priority: Medium
Expand Priority: Medium
Surface Scan Delay: 15 secs
Queue Depth: Automatic
Monitor and Performance Delay: 60 min
Elevator Sort: Enabled
Degraded Performance Optimization: Disabled
Inconsistency Repair Policy: Disabled
Wait for Cache Room: Disabled
Surface Analysis Inconsistency Notification: Disabled
Post Prompt Timeout: 0 secs
Cache Board Present: True
Cache Status: OK
Accelerator Ratio: 50% Read / 50% Write
Drive Write Cache: Disabled
Total Cache Size: 256 MB
No-Battery Write Cache: Enabled
Cache Backup Power Source: Batteries
Battery/Capacitor Count: 1
Battery/Capacitor Status: OK
SATA NCQ Supported: True

■Drive Write Cache: Disabledの場合
[xxxxx@sieben bonnie++-1.03e]$ ./bonnie++
Writing with putc()...done
Writing intelligently...done
Rewriting...done
Reading with getc()...done
Reading intelligently...done
start 'em...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
Version 1.03e ------Sequential Output------ --Sequential Input- --Random-
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
sieben.g2labo.o 12G 54644 73 60837 12 22649 2 54692 81 56139 1 587.2 0
------Sequential Create------ --------Random Create--------
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 72582 100 412133 98 98934 100 70691 99 635702 100 94902 100
sieben.g2labo.orz.hm,12G,54644,73,60837,12,22649,2,54692,81,56139,1,587.2,0,16,72582,100,412133,98,98934,100,70691,99,635702,100,94902,100

■Drive Write Cache: Enabledの場合

[xxxxx@sieben bonnie++-1.03e]$ ./bonnie++
Writing with putc()...done
Writing intelligently...done
Rewriting...done
Reading with getc()...done
Reading intelligently...done
start 'em...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
Version 1.03e ------Sequential Output------ --Sequential Input- --Random-
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
sieben.g2labo.o 12G 53561 74 81329 18 19345 2 53752 74 70574 3 364.9 0
------Sequential Create------ --------Random Create--------
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 87258 100 438074 98 129444 100 38488 45 939997 97 133011 99
sieben.g2labo.orz.hm,12G,53561,74,81329,18,19345,2,53752,74,70574,3,364.9,0,16,87258,100,438074,98,129444,100,38488,45,939997,97,133011,99

2009年7月12日日曜日

BRIDGEの作り方

BRIDGEの仕組みは非常に簡単です。
大きく分けると下記2つの処理となります。
・Webインターフェース(表示と受付)
・動画ダウンローダ
(昔はここにエンコードが有りました…)

順に説明をしていきます。

■Webインターフェース
言語はPHPでZendFrameworkを使用して作成しております。
viewエンジンとしてSmartyを併用し、出力とキャッシュをしております。

■動画ダウンローダ
言語はPerlで行い、LWPやCrypt、HTTP、DBIなんかがモジュールとして使用しております。

もちろんBRIDGEのコアとなるのがこの「動画ダウンローダ」になります。
とはいっても中身は検索すると出てくるニコニコ動画ダウンロードPerlスクリプトを元に
データベースとの連携を組み合わせた物です。

中身はサービス化(常駐)させる為のノウハウがつぎ込まれていますが、
それ以外に特殊なことはしておりません。
(コードとしては300行にも満たない)

当初は複数サーバを動かしても行けるような設計をしているため、
データベースにはトランザクションが出来るように設計しています。
今は複数サーバを置くリソースが無いためオーバースペックとなっていますが…

あとは既に設計されている物は流用してでも機能の実現を目指したため
そこら中ガタガタだったりします。

こんなメモ見る人はいないかと思いますが、同様のサービスを作りたい人の
参考になればと思います。