27 January 2011

mdadm vs lvm with reiserfs or ext3? - part 3

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 ext3 (will try reiserfs later)...

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, 17.5612 s, 61.1 MB/s

I noticed couple of CPU waitings (between 11%-50%), 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, 17.6383 s, 60.9 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, 16.943 s, 63.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, 17.7065 s, 60.6 MB/s

What i've noticed during step 3 is that CPU waiting was over 50%, which is bad.

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.00124287 s, 82.4 MB/s
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.00116396 s, 88.0 MB/s
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.00111929 s, 91.5 MB/s
...


real    0m0.160s
user    0m0.044s
sys     0m0.096s

This was a little bit faster than ext3 over MD... 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    1m48.386s
user    0m28.338s
sys     1m13.685s

I noticed that the CPU was 100% in use, some waitings were present and bash was using ~20%... this is good! Compared to MD is aproximately the same...

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    0m30.614s
user    0m0.224s
sys     0m1.832s

I noticed that there was a lot of CPU waiting time wasted (up to 90%)... MD was with 4 seconds faster!

No comments:

Post a Comment