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: 59% [?]

  • 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.

  • Burzukk

    I am a video designer and work with numerous and huge files that I wish to keep all this as safe as possible, fast and easy to access from my win7 os

    My questions:
    1.How will this virtual machine interract with windows 7. Via ftp!? 
    2. Is it possible to make it a DAS communicating directly with windows (recognized as just an external disk via esata). Would the VM OS just sort all this as the Drobo seems to?
    3. In its current state (NAS) can I just throw files from my ntfs drives at it whitout any concern and vice versa?
    4. Do you think there is any way I could work directly on the NAS from windows? Without using a ftp!? (edit files, open after effects projects from it, render directly on it, etc)

    I know you probably don’t use windows as and OS may not know all the answers concerning windows, but just trying to find answers, can’t find anything related to my questions on the web. Thanks!
     

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

    It was never meant to be a drobo killer. drobo has its place. but for the people who want the best performance/cost ratio, this is it.

    most importantly. if your drobo ever breaks down like mine did. your only bet is to buy another drobo. which can be quite costly for most people here

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

    Hi. forget about FTP. I never mentioned anything about it in the guide, nor are we ever going to be using that with this setup.

    The machine you end up building uses standard Windows file sharing protocol – SMB aka CIFS. This means that Windows can detect the server on the network directly. You will access the file just like you would with any standard Windows network share.

    And yes, you can drag and drop any file, any size of files you want from your existing NTFS partitions. 
    You will want to use fast hard drives. the WD Greens I used will not do you much good.

  • http://frankleng.me Frank

    the GPU is not going to help. I was referring to the main chipset which has a GPU embedded in it.

See also: