26 January 2011

mdadm vs lvm with reiserfs or ext3?

Step 1 - Installation
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 reiserfs (i will try later on with ext3 as well)...

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, 19.466 s, 55.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.8199 s, 54.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.4925 s, 55.1 MB/s

Step 3 - time DD
# time 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.4815 s, 55.1 MB/s


real 0m19.938s
user 0m0.572s
sys 0m18.209s

What i've noticed during step 2 and step 3 is that the CPU usage was 100%, with 0% waiting (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.0017858 s, 57.3 MB/s
... i'm not trying to waste your time here ...
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.00160117 s, 64.0 MB/s


real 0m0.162s
user 0m0.044s
sys 0m0.116s

This was fast... 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


...
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.00186699 s, 54.8 MB/s
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.0018261 s, 56.1 MB/s
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.00179114 s, 57.2 MB/s
...


real 1m54.760s
user 0m29.006s
sys 1m22.965s

I noticed that the CPU was 100% in use, but no waiting and bash was using ~18%... this is also very good!

Step 5 - LS

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

I noticed that the CPU was ~40% in use, but no waiting. This is good!

Step 6 - RM

# time rm *


real 0m2.955s
user 0m0.172s
sys 0m2.692

No comments:

Post a Comment