IOPS計測

iometerのdocumentより

  • For maximum throughput (Megabytes per second), try changing the Transfer

Request Size to 64K, the Percent Read/Write Distribution to 100% Read, and
the Percent Random/Sequential Distribution to 100% Sequential.

  • For the maximum I/O rate (I/O operations per second), try changing the

Transfer Request Size to 512 bytes, the Percent Read/Write Distribution to
100% Read, and the Percent Random/Sequential Distribution to 100%
Sequential.

どちらもシーケンシャル100%でREAD100%にすると最高の値が得られる。
64KBとか512Bって値は何か根拠があるのかわからないけど
スループットのためにはなるべく大きなサイズを一度に読む、
逆にIOPSのためにはなるべく小さいサイズをたくさん読む、
ということのようだ。

ちなみにデフォルトは以下の動きをするそうだ。
The default is 2-Kilobyte random I/Os with a mix of 67% reads and 33% writes,
which represents a typical database workload. You can leave it alone or change it.
Press OK to close the dialog when you are through.

NFSの強制umount

NFSサーバが不調で、リブート等していると
クライアント側が

# ls /mnt/nfs
Stale NFS file handle

などとエラーを吐くようになってしまった。
再mountを試みようとしてまずumountしたが

# umount /mnt/nfs
umount: device is busy

となってしまってダメ。umount -fもダメだった。

いろいろ調べた結果、以下なら大丈夫だとわかった。

# umount -l /mnt/nfs
#

その後、

# mount /mnt/nfs

で再mountして完了。

Virtualboxの共有フォルダ

まずゲストにゲストアドオンを追加
device -> Guest AddonのインストールでGuest Addon用のCDROMがゲストにマウントされる。

ゲストがWindowsの場合、自動でGuest Addonのインストールが始まる

ゲストがLinux(x86)の場合、/media/VBOX.../VBoxLinuxAdditions-x86.shを実行
x86_64の場合、/media/VBOX.../VBoxLinuxAdditions-amd64.shを実行

VirtualboxGUIで共有フォルダを設定後、
mount -t vboxsf 共有フォルダ名 /mnt/vbox
などとするとマウントできる。

Windowsからマウントする場合は
net use x: ¥¥vboxsvr¥share
と打つようだ。

参考:http://blog.goo.ne.jp/j_adversaria/e/9eace0f5c9a27066ce6121fd895d8192

bash の history

常にbash_historyに追記するようにする

shopt -s histappend

Timestampを残す

 history
 HISTTIMEFORMAT='%F %T '
 history

重複履歴を削除

HISTCONTROL=erasedups

SIZEを変更

HISTSIZE=10000

$HOME/.inputrcに以下を追加するとプロンプトから数文字入力してC-n,C-pで、その数文字から始まるコマンドをhistoryから探してくれる。
これはbashだけでなくreadlineを使っているプログラムすべてに有効な設定らしい。

"\C-n":history-search-forward
"\C-p":history-search-backward

補完で大文字小文字を無視

set completion-ignore-case on

参考