ZFS powered NAS, ultimate alternative to Drobo + Droboshare [Complete Guide]

FreeNAS Performance
NAS performance is often tricky to measure because everything is relative to the size of the file you are transferring and the caching technique used to facilitate the transfer. In my previous post about using the TonidoPlug as an alternative to Droboshare, I’ve discovered that these underpowered devices lacked sufficient amount of memory to cache large files. Therefore, the burst speed (transferring small files, say 5mb) is a lot faster than the sustained speed (transferring large files, say 2GB). The Droboshare gives 6mb/s of sustained speed when transferring anything over 300MBytes, read up on a quick review from Engadget.

After testing my FreeNAS rig, I copied a 4GB file via Gigabit Ethernet and the throughput sustained at 25MBytes/s, which is 4 times the speed of the Drobo + Droboshare! That’s not bad at all!

Reading speed is 35MBytes/s, not great but good enough. The bottleneck here seems to be the Intel NM10 chipset bundled with the new Atom chip. I have seen people with regular desktop chipsets that can do 70-80MBytes/s read and 30-40MBytes /s write.

System Tweaks
The out of the box performance wasn’t exactly topnotch, but it’s nothing that can’t be fixed without a little tweaking. Since we use ZFS and Samba, let’s dig into the details on these two beasts.

ZFS
First, make sure you are running the latest nightly build FreeNAS that has the latest vesrion of ZFS – version 13.
Secondly, ZFS is a very memory intensive file system, largely due to the caching. The more caching done, the faster the speeds.
To change the cache size, login to the FreeNAS web GUI, Advanced->File Editor and load /cf/boot/loader.conf (if you are using the embedded FreeNAS version). Otherwise, load /boot/loader.conf

Copy and paste the following code and save the file.

kern.hz="1000"
vm.kmem_size="1524M"
vfs.zfs.arc_min="256M"
vfs.zfs.arc_max="768M"
vfs.zfs.txg.timeout="10"
vfs.zfs.vdev.max_pending="10"
vfs.zfs.vdev.min_pending="4"

This tweak is best for systems with 2GB of RAM. The vm.kmem_size defines the total amount of RAM the kernel can allocate for ZFS. It should be set to about 50%-70% of your total RAM size. The vfs.zfs.arc_max size should be about half of vm.kmem_size.

Samba
The folks over at FreeNAS have done a great job of keeping Samba up to date, especially with the latest nightly builds. Most of these experimental builds have been rock solid.
The secret to having a speedy Samba server is to enable Asynchronous IO. This feature has been built into the latest nightly build starting from FreeNAS 0.7.2 (5191).
Simply go to your Samba configuration page in the web GUI, and enable AIO and use the default value of “1″ for both AIO Read and Write size.
Also do not forget to enable the “Large Read/Write” feature for  Samba, and enable keneral tuning. (Go to System->Advanced – enable Tuning)

That’s it, after a reboot you are done. Most of the optimizations have been enabled by FreeNAS out of the box, but there are some experimental features that you have to dig out on your own. You should test the ZFS RAM size and its impact on performance. Also be aware that the memory size allocated cannot be too large, or your system may become unstable.

That’s it guys, this concludes my NAS build. I apologize for the long wait, but the end result is very satisfying.

It is possible to build your own NAS with Drobo abilities for half of the price and 5 times the speed.  =p

Please leave comments and questions.

Popularity: 63% [?]

  • eric

    Hi Frank,

    I think you missed my comment.

  • http://www.frankleng.me Frank Leng

    oh sorry about that. I got the case from NCIX.com
    they are Canadian but also have a US site.

  • eric

    Thanks. I never ordered anything from NCIX before, but I’ve heard of them before.

    Thanks for letting me know :)

    I think I might just get the Fractal Design Define R3 :)

  • Pingback: Review – HP Microserver « Chris Swan's Weblog

  • gcs8

    i got feedup with my drobo about 3 months ago when i ran out of space (95%) an it slowed down a lot. so i build my self a freenas box that now holds 20 2TB drives in a raidZ2 with ZFS over iscsi for 33.9TB of storage and a lot better RW speeds. let me know what you think i will leave some links if you dont mind, its my new baby. http://gcs8.org/m http://gcs8.org/rack great wright up BTW.

  • Concord

    Not sure if you want it for personal use or corporate use.  In any case, for business, I’m using a couple of aberdeen inc. (abernas) RAID6 standard NAS servers for 4-5 years.  They came out with ZFS server using NExenta software in 2010.  Like any rack server, the fans are real noisy, at least on the ones I have.

  • Izrada web sajtova

    This is a
    great and informative post.Well, the points given were facts that could never
    go wrong. I have visited so many pages with the same discussion and topics

     

    Izrada web sajtova

  • Polovni automobili

    Great job here. I really enjoyed
    what you had to say.           

    Polovni
    automobili

  • http://www.day-traders.com/ day traders

    I really love reading your comments guys.I learn a lot from you.

    Thank you so much.

    Regard,

    Epoyjun

  • mobi

    Thanks for a great article, I’m now fully signed up to freenas! I’m using the Asus E35M1-M PRO
    http://www.asus.com/Motherboards/AMD_CPU_on_Board/E35M1M_PRO/

    but I fail to see how the GPU is going to help with data copy throughput. Can you explain? Maybe freebsd or zfs makes use of the GPU??

  • Mbwjoe

    I think all you’ve done here is prove just how great the drobo is.

See also: