Building a NAS: Stage 1 (Rationale and Hardware)

Currently I live in a share house with four other people. It’s a very internet-connected sharehouse; three of us are heavily into gaming, all of us are heavily into internet, three of us are students, and all of us have precious data which is important that we’d rather not lose.

Enter me, and my extensive ability to play with neat toys. Surely there’s something I can do, or build, or make, that can benefit everyone? What do you know: there is! I picked up an old file server system from my parents’ place which was serving as a back up system for my dads business. It had 2x 500Gb Western Digital hard disks running in a RAID1 (mirror) array. The system ran fine for about three years and was based on the following, which I had aquired from eBay and the local computer store some years prior:

  • Intel Celeron 1000Mhz (Tualatin)
  • 2x256Mb PC100 SDRAM
  • Intel i815-based mainboard
  • Sil3114 4-port PCI SATA150 card
  • Realtek-based PCI network card

It ran Arch Linux (a mistake, but once it was setup, it never needed administering, so not too bad I guess), and worked without issue for several years. Come a few months ago, and it was no longer needed, so I reclaimed it. Aside from one of the disks having ~1700 bad sectors (but thankfully still in warranty), the rest of the system was fine, if a little dusty.

Of course my operating system of choice was Linux. Two main reasons: (1) it doesn’t cost anything, and (2) (and this is the real reason) should my hardware die, (which is more probable than it not dying, on account of the fact that it is coming up on ten years old) with a Linux-based system I can literally plug the hard disks into a totally different CPU, motherboard & RAM and have it back up and running in no time at all. In the event of a mainboard, CPU or memory failure, the system would not need to be rebuilt. Linux’s ability to cope with massive hardware changes is perfect for my untrustworthy hardware.

In the meantime though I thought to myself that the old Celeron could be used once more: the PCI SATA card still had two free ports, and PCI gigabit network cards are cheap. So, I bought two Western Digital “Green Power” 1Tb drives and a Realtek-based PCI gigabit NIC and away I went with a Ubuntu 9.10 Server install. After dealing with a small issue of the operating system not booting because the version of GRUB it ships with had some strange bug whereby it couldn’t find PATA hard disks, I had it up and running.

Some figures: the maximum write speed I can put to the system over network is a fairly pedestrian 25Mb/sec; that’s over FTP on a “Gigabit” network (I say gigabit in quotes because I went cheap on the switch; using iperf to benchmark it yields a maximum throughput of about 370Mbit). The CPU usage is 100%. scp-ing stuff over the same link maxes out at about 9Mb/sec, and rsyncing maxes out at about 2.5Mb/sec, all three figures because the CPU is maxed out. The only good figure I see out of the system is its power draw: using an inline measurement tool I picked up from Jaycar, the system pulls a max. of about 44 watts. That’s with:

  • Intel Celeron 1000Mhz (Tualatin)
  • 2x256Mb PC100 SDRAM
  • Intel i815-based mainboard
  • Sil3114 4-port SATA150 card
  • Realtek RTL-8169 gigabit NIC
  • Western Digital 200Gb WDC WD2000JB-00GVC0 (boot disk)
  • Western Digital “Green Power” 1Tb WDC WD10EADS-65M2B0
  • Western Digital “Green Power” 1Tb WDC WD10EADS-00P8B0
  • Western Digital “Blue” 640Gb WDC WD6400AAKS-00A7B0
  • Western Digital 500Gb WDC WD5000AAKS-00YGA0
  • 2x 120mm fans, 1x80mm CPU fan, 1x80mm PSU fan
  • For general file server usage it is fine. I can stream 4x 720p movies from the system without any trouble. Copying large datasets to it over Samba or FTP isn’t too bad. However, the main purpose of the system is to be a backup of important documents etc with each person in the household having up to 200Gb available. At present, the rsync of a ~180Gb dataset has taken approximately 15 hours; and it is still running on account of that heavily CPU-limited 2.5Mb/sec that rsync manages. This is however on the first pass, so I wonder if the performance will be so terrible on the second pass?

    The puzzle I have is thus: with all the traffic going over the PCI bus, which maxes out at 133Mb/sec, is that 25Mb/sec write speed I see over FTP on account of the CPU being maxed out from calculating the data flow (ie, the data itself), or is it maxing out calculating the PCI subsystem (ie, co-ordinating the data)? Theoretically I should see at least 66Mb/sec (PCI bus total speed divided by two); but I have measured the average write performance of one of the “Green Power” disks to be around 38Mb/sec. So, it won’t reach the theoretical maximum of the PCI bus when writing, however that 25Mb/sec still falls short. At least I have some headroom to maximise the performance of my disk subsystem with faster buses.

    There are fortunately a lot of options becoming available which I can use to my advantage; specifically, a lot of Atom-based mini-ITX boards with low power computing in mind. Unfortunately many of them are not really designed for low-power NAS duties with most only having two SATA ports and no expension options. There are a few however that are going ‘all-out’ on the features department, but many are not available in Australia yet. The Zotac boards, Supermicro boards, and the Gigabyte boards have 4+ SATA ports, with the Zotac being my favourite as it also has a single PCIe x16 slot – with the addition of a simple graphics card, the system could go from NAS to full-fledged HD-capable HTPC. While I don’t currently have that purpose in mind, there’s no reason why it couldn’t happen in the future.

    But, would this really improve the performance of my server? I am going to assume that it would. The NM10 chipset has modern data buses to support it: DDR memory, PCIe, and USB2.0 to name a few. What of the CPU, though? The D510 is a dual-core, low power solution running at 1.6Ghz. But, the Atom achieves its low power through some trickery: it’s actually a RISC CPU with a CISC wrapper around it. There was some worry when they were first released that their performance with unoptimized software would be terrible.

    PassMark CPU chart for the Atom D510, and PassMark CPU chart for an Intel Celeron 1000Mhz (scroll waaay down) – no competition, right? Let’s hope so. With this, and anecdotal evidence collected from forums stating that an Atom-based NAS can achieve 1Gbps+ (with dual NICs in a team), I shouldn’t expect to see a drop in performance.

    At present, my favourite local retailer has “preorder” status on the Gigabyte GA-D510UD for around $110. I can’t find Zotac solutions being offered for sale anywhere in Australia. I will have to keep an eye on the performance of the system to see if upgrading would be worthwhile.


About this entry