27 January 2011

mdadm vs lvm with reiserfs or ext3? - part 4

Step 1 - Installation
Clean install on a SATA disk of debian 5.0.8. During the instalation phase i've configured the LVM from 2 disks, SAMSUNG HD103SJ or Samsung F3 - 1TB each. Over it i've put reiserfs (ext3 tests are 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, 20.5493 s, 52.3 MB/s

I noticed couple of CPU waitings (between 1-5%), which were not present with MD.

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, 20.4989 s, 52.4 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, 20.1651 s, 53.2 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, 19.7539 s, 54.4 MB/s

What i've noticed during step 3 is that CPU waiting was between 1-5%, which is better than ext3, but the writing speed was lower.

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.00184347 s, 55.5 MB/s
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.00177727 s, 57.6 MB/s
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.00181252 s, 56.5 MB/s
...


real    0m0.175s
user    0m0.020s
sys     0m0.144s

This was a little bit slower than ext3 over LVM... 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    2m1.054s
user    0m30.818s
sys     1m26.609s

I noticed that the CPU was 100% in use, some waitings were present and bash was using ~20%... this is the worst until now!

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

I noticed that the CPU was ~90% idle, but no waiting. This is good, a little bit better than MD.

Step 6 - RM
# time rm *
real    0m2.976s
user    0m0.208s
sys     0m2.736s

I noticed that there was a lot of CPU waiting time wasted (up to 90%)...

No comments:

Post a Comment