Hi, I'm switching over from FreeNAS to Ubuntu Server 12.04 for my NAS box and am converting my ZFS pools to mdadm RAIDs and am having some serious issues reading/streaming files over SMB.
Server is AMD E-350 APU with 8GB DDR3 RAM.
I have two 1.5TB hard drives of different makes in a RAID0 configuration, and then shared over the network using samba.
Individually, one drive would copy over SMB to my desktop at 100 MB/s, the other at around 70 MB/s. (the first is a Seagate ST1500DL003 5900 RPM drive and the second is a WD Green WD15EADS with a few more hours under its belt.)
When striped together, I get a MAX of 10 MB/s under the same network conditions. When ssh'd into the server browsing the drive simply doesn't feel snappy either. Totally different than my old ZFS stripe which worked fine.
Here's what I used to create the RAID and create the file system:
Code:
parted -a optimal /dev/sdb
mkpart primary 1MiB 100%
set 1 raid on
quit
parted -a optimal /dev/sdc
mkpart primary 1MiB 100%
set 1 raid on
quit
mdadm --create --verbose /dev/md0 --level=stripe --chunk=32 --raid-devices=2 /dev/sdb1 /dev/sdb2
mkfs.ext4 -b 4096 -E stride=8,stripe-width=16 /dev/md0
tune2fs -O has_journal -o journal_data_writeback /dev/md0
tune2fs -O dir_index /dev/md0
e2fsck -D /dev/md0
mdadm --detail --scan >> /etc/mdadm/mdadm.conf
mount /dev/md0 /mnt/storage -o noatime,nodiratime,data=writeback,stripe=16,barrier=0,errors=remount-ro
I understand some of my file system options may be risky, but I tried it yesterday with the defaults (didn't specify chunk, stride, stripe-width; no journal tuning) and got the same result.
I also know that I will lose the stripe if I lose one drive, I understand that, I have nightly backups running.
Here's some more information:
Code:
#cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid0 sdb1[0] sdc1[1]
2930274240 blocks super 1.2 32k chunks
unused devices: <none>
Code:
#mdadm -D /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Sat Aug 10 16:20:23 2013
Raid Level : raid0
Array Size : 2930274240 (2794.53 GiB 3000.60 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Sat Aug 10 16:20:23 2013
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Chunk Size : 32K
Name : oldtown:0 (local to host oldtown)
UUID : e50ae570:427d0db7:475bc4cc:8f86f703
Events : 0
Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 8 33 1 active sync /dev/sdc1
Code:
#hdparm -tT /dev/md0
/dev/md0:
Timing cached reads: 2122 MB in 2.00 seconds = 1060.41 MB/sec
Timing buffered disk reads: 302 MB in 4.59 seconds = 65.80 MB/sec
Code:
#dd if=/dev/zero of=testfile bs=1M count=5000
5000+0 records in
5000+0 records out
5242880000 bytes (5.2 GB) copied, 65.2134 s, 80.4 MB/s
#dd if=testfile of=/dev/zero bs=1M
5+0 records in
5+0 records out
5242880000 bytes (5.2 GB) copied, 4.0535 s, 1.3 GB/s
#dd if=/dev/zero of=testfile bs=1000M count=5
5+0 records in
5+0 records out
5242880000 bytes (5.2 GB) copied, 65.4636 s, 80.1 MB/s
#dd if=testfile of=/dev/zero bs=1000M
5+0 records in
5+0 records out
5242880000 bytes (5.2 GB) copied, 5.69963 s, 920 MB/s
Code:
#time cp testfile testfile2
real 2m42.178s
user 0m0.100s
sys 0m19.525
Excerpt from smb.conf
Code:
[storage]
comment=
path=/mnt/storage
guest ok=yes
browseable=yes
create mask=0744
directory mask=0755
read only=no
follow symlinks=yes
wide links=no
Thanks in advance for your help!
Also for what it's worth, the 3TB drive is running UFS right now and when samba shared transfers at a speedy 100 MB/s.
Bookmarks