Gentoo Archives: gentoo-user

From: victor romanchuk <rom@××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Want to seriously test a NEW hard drive
Date: Sun, 05 Aug 2012 20:05:04
Message-Id: 501ED16B.8030509@persimplex.net
In Reply to: [gentoo-user] Want to seriously test a NEW hard drive by Dale
1 hi
2
3 Dale wrote, at 08/05/2012 04:45 PM:
4 > Howdy,
5 >
6 >
7 > I have heard of bonnie and friends. I also think dd could do some
8 > testing too. Is there any other way to give this a good work and see if
9 > it holds up? Oh, helpful hints with Bonnie would be great too. I have
10 > never used it before. Maybe someone has some test that is really brutal.
11 >
12
13 some time ago i have played with bonnie++ to figure out my hard disk performance
14 using different filesystems and io schedulers. the script invokes 3 bonnie
15 instances; each instance runs its own set of tests: write/read/rewrite a 30gb
16 file followed with different file operations on 48k small files spread over 32
17 sub-directories:
18
19 #!/bin/bash
20 #
21 scratch=${1:-$(pwd)}
22 #
23 date
24 ft=$(df -Pl $scratch|tail -1|awk '{print $6}')
25 mnt=($(mount|grep "$ft "))
26 dev=$(basename $(readlink -fn ${mnt[0]}))
27 sched=$(cat /sys/block/$dev/queue/scheduler|sed -e 's/.*\[//1' -e 's/\].*//1')
28 log="$dev-${sched}-${mnt[4]}"
29 echo $log
30 rm -f ${log} ${log}.html
31 /usr/sbin/bonnie++ -p 3
32 /usr/sbin/bonnie++ -qd $scratch -n48:128K:16K:32 -ys -s30g -mg1 >> ${log} &
33 /usr/sbin/bonnie++ -qd $scratch -n48:128K:16K:32 -ys -s30g -mg2 >> ${log} &
34 /usr/sbin/bonnie++ -qd $scratch -n48:123K:16K:32 -ys -s30g -mg3 >> ${log} &
35 wait
36 /usr/sbin/bonnie++ -p -1
37 bon_csv2html ${log} >> ${log}.html
38 date
39
40 this script worked around 30mins on a sata3 1tb drive. presuming your 3tb, you
41 may adjust the file size and/or number of bonnie instances to fill up the disk
42 space; then start the script and leave it running for a day. i guess this test
43 would be brutal enough and on completion the disk might be considered good :)
44
45 victor