テストまで1週間ぐらいやw何も勉強してねえ
このWebサーバーは仮想で動いてるんですけどその物理サーバーのHDDが入/出力エラーを吐いてて死にそうだなと
思ったので翌日に届くHDDを探していたところこのHDDがあった。
MARSHALのHDDって東芝かどっかのOEM?か何からしいってのを聞いた。
Amazonで6,980円でした。
参考にならない hdpram でベンチマーク取ってみた。
tetsuyai’s blog さんからスクリプトを借りました。
#!/bin/bash
if [ -z $1 ]
then
echo "Usage: `basename $0` FILESYSTEM" 1>&2
exit 1
fi
# It measures 12 times and displays a result.
for i in 0 1 2 3 4 5 6 7 8 9 10 11
do
sleep 10
_lines[$i]=`hdparm -t $1`
echo [$i] ${_lines[$i]}
_speeds1[$i]=`echo ${_lines[$i]} | cut -d' ' -f12`
done
# A result is rearranged into an ascending order.
IFS=$'\n'
_speeds1=(`echo "${_speeds1[*]}" | sort`)
# The minimum and the maximum are excepted and average value is calculated.
_sum=0
for i in 1 2 3 4 5 6 7 8 9 10
do
_speeds2[$i]=${_speeds1[$i]}
done
_avg=`echo "${_speeds2[*]}" | awk '{s+=$1}END{print s/10}'`
# Average value is displayed.
echo "AVG $_avg MB/sec"
12回測定して、最小最大を抜いた平均をだしてくれるみたいです。
まずはProxmoxとWebサーバーが動いた状態のSSDで実行してみる。
root@proxmox:~# ./read.sh /dev/sdb [0] /dev/sdb: Timing buffered disk reads: 808 MB in 3.01 seconds = 268.84 MB/sec [1] /dev/sdb: Timing buffered disk reads: 808 MB in 3.00 seconds = 269.05 MB/sec [2] /dev/sdb: Timing buffered disk reads: 810 MB in 3.01 seconds = 269.38 MB/sec [3] /dev/sdb: Timing buffered disk reads: 810 MB in 3.00 seconds = 269.64 MB/sec [4] /dev/sdb: Timing buffered disk reads: 810 MB in 3.01 seconds = 269.43 MB/sec [5] /dev/sdb: Timing buffered disk reads: 812 MB in 3.01 seconds = 270.04 MB/sec [6] /dev/sdb: Timing buffered disk reads: 810 MB in 3.00 seconds = 269.93 MB/sec [7] /dev/sdb: Timing buffered disk reads: 812 MB in 3.01 seconds = 270.04 MB/sec [8] /dev/sdb: Timing buffered disk reads: 810 MB in 3.00 seconds = 269.91 MB/sec [9] /dev/sdb: Timing buffered disk reads: 810 MB in 3.00 seconds = 270.00 MB/sec [10] /dev/sdb: Timing buffered disk reads: 810 MB in 3.00 seconds = 269.72 MB/sec [11] /dev/sdb: Timing buffered disk reads: 812 MB in 3.01 seconds = 270.01 MB/sec AVG 269.711 MB/sec
今回買ったHDD。
root@proxmox:~# ./read.sh /dev/sdc [0] /dev/sdc: Timing buffered disk reads: 580 MB in 3.01 seconds = 192.85 MB/sec [1] /dev/sdc: Timing buffered disk reads: 578 MB in 3.01 seconds = 192.04 MB/sec [2] /dev/sdc: Timing buffered disk reads: 578 MB in 3.00 seconds = 192.38 MB/sec [3] /dev/sdc: Timing buffered disk reads: 578 MB in 3.01 seconds = 192.33 MB/sec [4] /dev/sdc: Timing buffered disk reads: 578 MB in 3.01 seconds = 192.32 MB/sec [5] /dev/sdc: Timing buffered disk reads: 576 MB in 3.00 seconds = 191.95 MB/sec [6] /dev/sdc: Timing buffered disk reads: 578 MB in 3.01 seconds = 192.26 MB/sec [7] /dev/sdc: Timing buffered disk reads: 576 MB in 3.00 seconds = 191.98 MB/sec [8] /dev/sdc: Timing buffered disk reads: 578 MB in 3.01 seconds = 192.24 MB/sec [9] /dev/sdc: Timing buffered disk reads: 578 MB in 3.01 seconds = 192.27 MB/sec [10] /dev/sdc: Timing buffered disk reads: 576 MB in 3.00 seconds = 191.95 MB/sec [11] /dev/sdc: Timing buffered disk reads: 578 MB in 3.01 seconds = 192.28 MB/sec AVG 192.205 MB/sec
割りと速い気がする。
と早速サーバーに入れて使ってますけどまた入/出力エラーが出た。
これは…