Strange compliance symbol

I noticed this strange EMC conformity certification on the way to a Thai restaurant.  What this is  photosupposed to mean is above my pay grade.

Advertisements

FreeNAS as a home NAS

NAS Selection

I have been looking at installing a NAS (Network Attached Storage) in my home for some time. For me, it came down to Synology, FreeNAS or NAS4Free.  Synology is a commercial product. Friends who own them rave about them.  I was looking for about 8TB of net storage, and the DS412+ looked like the best model for me.  The Synology DS412+ was running at $599 last time I checked.  One nice thing about Synology NAS boxes is they have a lot of apps they call, “add on packages”, the most interesting of which, for me, are for video surveillance.  In the end, I thought $599 was a little steep, and besides the IP camera surveillance plug-in, I thought  I mightdo better with a home-built system.

I decided to install FreeNAS, and then NAS4Free on an old PC and then see if either of them worked well enough, of if I should go buy the Synology.  I the end, I just tried FreeNAS and didn’t evaluate the other options, as it worked well enough for me.

DIY

If you use FreeNAS, you need to buy or build a system.  FreeNAS (like NAS4Free and others) use ZFS.  A non-toy system that uses ZFS requires ECC DRAM.  In the past, ECC DRAM was much more expensive than non-ECC DRAM but that is no longer the case.  Most consumer motherboards and Intel chips do not support ECC DRAM, but the Intel i3 does.  I priced out building a system at Newegg but ended up buying a Lenovo TS140 server with 4GB .  This is a very decent server with efficient 280W power supply, and an Intel NIC.  I added 16GB (2×8) of Crucial ECC DRAM for a total cost of $467 on Amazon, or $187 less than the Synology, with Kalifornia tax included.  Of course, you have to buy the drives after that.  I got 2 WD Red 4TB drives and plan on adding 2 more.

Drives and Where to Buy Them

A lot of people I know who have NAS drives have complained of drive failures.  It seems that Amazon-sourced drives failed the most.  I have noticed a steady deterioration in the quality of packaging that Amazon sends with their products, which probably has a lot to do with it.  For example, I received from Amazon woodworking bar clamps and hand cream put into one big box with a grand total of 1 of those air packing pillows inside.  I guess you get what you pay for with free shipping.  Anyway, I figured the best thing was to source the hard drives from a local store.  I’m not saying the 4TB WD Red drives were hand carried on a velvet pillow from Singapore to my Micro Center store, but I had reasonable confidence they were not too beat up in shipping.

RAID Level

One of the benefits of NAS is the ability to have some fault tolerance for your data (without it being a true back-up)  In the past, it made sense to do RAID5, which uses drives to provide distributed parity of the data.  These days, when a drive fails, the rebuild time for RAID5 is so long that it can cause an additional drive to fail, and since RAID5 only can tolerate 1 disk being lost, many people recommend using RAID 1 or RAID 10 instead.  RAID 1 is just mirroring without parity.  Raid 10 is simply two spans of RAID 1.  Right now I am using RAID1 and will move to RAID10 when I buy 2 more 4 TB drives.  This would give me the ability to loose 1 drive in each span without loosing data.

Setup

The first step is to install FreeNAS to a USB stick.  In windows, you need to use 7zip to decompress the FreeNAS image and Win32DiskImager to write it to the USB drive.  Directions are on the FreeNAS webpage.  Then, you have to configure your server to boot on a USB drive.  For the TS140, this is rather involved.  I couldn’t figure out how to get the drive to boot the USB drive until I found this forum post: source.  My BIOS was already updated so I disabled UEFI and it finally booted the USB.  It took a long time to install, but it finally installed.  Subsequent boot-ups have been faster.

Setup for FreeNAS is rather involved and it has nothing directly to do with FreeBSD.  I decided to just do a simple CIFS setup.  The setup for CIFS could be easier, but I got it working.  I did some mild performance tuning for the Windows machine’s SAMBA buffers and logging and then I was in business.

I immediately found that it took forever to browse photographs and videos, right clicking (from Windows) on a directory and going to >properties>Customize> Optimize this folder for ‘Pictures’ helped speed things up.

Test Results

I used Crystal Disk Mark to characterize the performance.  Again, this is using CIFS (Samba).

———————————————————————–
CrystalDiskMark 3.0.2 x64 (C) 2007-2012 hiyohiyo
Crystal Dew World : http://crystalmark.info/
———————————————————————–
* MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s]

Sequential Read : 104.921 MB/s
Sequential Write : 109.971 MB/s
Random Read 512KB : 102.207 MB/s
Random Write 512KB : 105.567 MB/s
Random Read 4KB (QD=1) : 13.472 MB/s [ 3289.1 IOPS]
Random Write 4KB (QD=1) : 8.261 MB/s [ 2016.9 IOPS]
Random Read 4KB (QD=32) : 113.568 MB/s [ 27726.7 IOPS]
Random Write 4KB (QD=32) : 13.724 MB/s [ 3350.5 IOPS]

Test : 1000 MB [Y: 46.2% (1686.7/3652.8 GB)] (x5)
Date : 2014/08/02 13:27:11
OS : Windows 7 Professional SP1 [6.1 Build 7601] (x64)

i thought that maybe the large ZFS cache was skewing performance for the FreeNAS system, so I increased the test size to 4GB.  Here are those results:

———————————————————————–
CrystalDiskMark 3.0.2 x64 (C) 2007-2012 hiyohiyo
Crystal Dew World : http://crystalmark.info/
———————————————————————–
* MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s]

Sequential Read : 105.850 MB/s
Sequential Write : 109.361 MB/s
Random Read 512KB : 101.837 MB/s
Random Write 512KB : 104.718 MB/s
Random Read 4KB (QD=1) : 13.144 MB/s [ 3209.0 IOPS]
Random Write 4KB (QD=1) : 8.261 MB/s [ 2016.9 IOPS]
Random Read 4KB (QD=32) : 4.051 MB/s [ 989.0 IOPS]
Random Write 4KB (QD=32) : 2.443 MB/s [ 596.5 IOPS]

Test : 4000 MB [Y: 46.2% (1686.7/3652.8 GB)] (x5)
Date : 2014/08/02 14:01:26
OS : Windows 7 Professional SP1 [6.1 Build 7601] (x64)

This seems to compare favorably with some of the results I have seen on the web for DS412+ performance.  source.  For additional comparision, here are the Crystal Disk Mark results with my Western Digital 2TB WDC WD20EARS-00MVWB0 drive which is mounted inside my Windows i7 box:

———————————————————————–
CrystalDiskMark 3.0.2 x64 (C) 2007-2012 hiyohiyo
Crystal Dew World : http://crystalmark.info/
———————————————————————–
* MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s]

Sequential Read : 119.550 MB/s
Sequential Write : 119.714 MB/s
Random Read 512KB : 34.464 MB/s
Random Write 512KB : 62.779 MB/s
Random Read 4KB (QD=1) : 0.424 MB/s [ 103.6 IOPS]
Random Write 4KB (QD=1) : 0.812 MB/s [ 198.3 IOPS]
Random Read 4KB (QD=32) : 0.810 MB/s [ 197.7 IOPS]
Random Write 4KB (QD=32) : 0.832 MB/s [ 203.2 IOPS]

Test : 1000 MB [E: 50.2% (147.0/293.0 GB)] (x5)
Date : 2014/08/02 13:39:44
OS : Windows 7 Professional SP1 [6.1 Build 7601] (x64)

Summary

I am pleased with FreeNAS and my Lenovo TS140 server.  If you are reasonably technically adept, you can install FreeNAS on a server and have a high performing NAS for less price than a Synology unit.