26 January 2011

mdadm vs lvm with reiserfs or ext3? - part 2

Step 1 - Installation
Same as before... Clean install on a SATA disk of debian 5.0.8. During the instalation phase i've configured (very easy) the MD raid0 from 2 disks, SAMSUNG HD103SJ or Samsung F3 - 1TB each. Over it i've put ext3 (i tried with reiserfs here)...

I have to add that this is a minimum installation, with no services installed.

Step 2 - DDx3
# dd if=/dev/zero of=/storage/test bs=1024 count=1M
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 13.9927 s, 76.7 MB/s

I noticed a small waiting time while doing this... ~2-3%.

Step 3 - time DD
# dd if=/dev/zero of=/storage/test bs=1024 count=1M
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 14.004 s, 76.7 MB/s


# dd if=/dev/zero of=/storage/test bs=1024 count=1M
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 13.6571 s, 78.6 MB/s


# dd if=/dev/zero of=/storage/test bs=1024 count=1M
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 14.2677 s, 75.3 MB/s

What i've noticed during step 2 and step 3 is that the CPU usage was 100% like with reiserfs, but the writing speed was with ~50% higher (which is good).

Step 4 - multiple files
# time for i in a b c d e f g h i j k l m n o p q r s t u v w x y z; do dd if=/dev/zero of=./$i bs=1024 count=100; done
...
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.00113659 s, 90.1 MB/s
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.00114485 s, 89.4 MB/s
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.00116158 s, 88.2 MB/s
...


real 0m0.182s
user 0m0.048s
sys 0m0.108s

This was way faster then reiserfs... let's add more files!

# time for k in a b c d e f g h i j k l m n o p q r s t u v w x y z; do for j in a b c d e f g h i j k l m n o p q r s t u v w x y z; do for i in a b c d e f g h i j k l m n o p q r s t u v w x y z; do dd if=/dev/zero of=./$i$j$k bs=1024 count=100 >/dev/null 2>/dev/null; done; done; done


real 1m54.091s
user 0m30.342s
sys 1m18.085s

I noticed that the CPU was 100% in use, but no waiting and bash was using ~20%... this is also very good! Compared with reiserfs... well it's less than one second for 17,604 files.

Step 5 - LS

# while true; do ls -lah; done // i left it running for couple of minutes

I noticed that the CPU was ~80% in use, but no waiting. This is good, but worst than reiserfs.

Step 6 - RM

# time rm *
real 0m26.316s
user 0m0.216s
sys 0m1.800s

I noticed that there was a lot of CPU waiting time wasted... reiserfs was much better here!

No comments:

Post a Comment