1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

NAS200 performance (or lack of)

Discussion in 'Cisco/Linksys Network Storage Devices' started by alejandro_liu, Oct 7, 2008.

  1. alejandro_liu

    alejandro_liu Addicted to LI Member

    The first thing I did once I bough my NAS200 was to remove the stock firmware and put a hacked firmware. Because one of the main concerns of NAS200 users was performance (or lack of) for the box.

    So now that I have my system doing something useful, I have made some (informal) measurements. I would like to hear for other people's comments as it will let me now if I am doing better or worse...

    My configuration, I boot my NAS200 from a USB thumb drive, (so the SATA drives can get a chance to spin down) and installed two identical Samsung 320GB drives.

    The configuration of my PC is not important as the NAS200 seems to be the main bottle neck.

    So some figures:

    1) hdparm -t /dev/sda (or /dev/sdb) this measure the speed the NAS200 can read from its internal drives: 14.94MB/s - 15.34MB/s

    2) Line speed for 100BaseT Ethernet is 10MB/s

    3) Theoretical speed for TCP/IP transfers is 9MB/s (protocol overhead)

    4) Raw network transmission:

    Write test: 7.4MB/s
    NAS200> nc -l -p 1234 > /dev/null
    CLIENT> dd if=/dev/zero bs=1M count=120 | nc box01 1234
    Read test: 4.9MB/s
    NAS200> nc box01 1234 | dd of=/dev/zero bs=1M
    CLIENT> dd if=/dev/zero bs=1M | nc -l -p 1234
    5) Writing/Reading to different paritions using NFS was done with:
    Write> dd if=/dev/zero of=t1 bs=1M count=120
    Read> dd if=t1 of=/dev/null bs=1M
    My results were:
    			Write	Read
    USB Flash drive		803kB/s	855kB/s
    LV with 1 mirror	2.2MB/s	3.8MB/s
    LV with 2 stripes	2.5MB/s	3.9MB/s
    LV (default)		2.5MB/s	4.1MB/s
    MDADM Raid1		2.5MB/s	4.0MB/s
    So, as I was generating test files for benchmarking, I took a look a the output of the "top" command my NAS200 and I got this:

    CPU:  1.3% usr 85.9% sys  0.0% nice  0.0% idle  0.5% io  1.7% irq 10.3% softirq
    Compare to my desktop "top" values
    Cpu0  :  0.0%us,  1.0%sy,  0.0%ni, 52.5%id, 46.5%wa,  0.0%hi,  0.0%si,  0.0%st
    Cpu1  :  0.7%us,  6.0%sy,  0.0%ni,  0.0%id, 91.4%wa,  0.3%hi,  1.7%si,  0.0%st
    You will notice, that the NAS200 spents a lot of CPU time in sys and soft IRQ, as opposed to the desktop that spent most of the time in idle and wait (io) states.

    Looks like the CPU is the one shuffling all the data back and forth.

    So short of replacing the motherboard, looks like the only way to squeeze more performance out of the NAS200 is to try to reduce its functionality to the minimum possible.

    Another thing that puzzles me is the difference between raw TCP performance in write/read mode. I am able to send to the NAS200 at 7.4MB/s, but I can only read from it at 4.9MB/s. I don't understand why there is this difference?

    While the disc configuration, (RAID1, RAID0, non-raid) did have some impact on the performance, the difference was quite small. However, it almost looks like using RAID0 is pointless here. The CPU overhead is more than the disc I/O overhead. So people thinking RAID0 for performance would be sadly disappointed with the NAS200.

    I am pleased that I was able to read using NFS at a speed close to the raw TCP read speeds: 4.0MB/s.

    I am not sure why the write performance was only 2.0MB/s. I would have expected close to 4.0MB/s (if not more...) but I did not try tweaking my NFS client options.

    What numbers are you getting?
  2. macblob

    macblob Addicted to LI Member

    The fastest I can get right now is 1.71 MB/s and that is with firmware update 2.0 from Linksys. What were you getting before you installed your hacked firmware?
  3. alejandro_liu

    alejandro_liu Addicted to LI Member

    I never bothered to test the stock firmware (I am a Linux user and the stock firmware is not very Linux friendly).

    I have seen figures reported in this forum from 2.2MB/s to 7MB/s (with a ext2 filesystem).
  4. macblob

    macblob Addicted to LI Member

    What is the ext2 file system? I would kill to get 7MB/s either way. Still the fastest I can get now is 4MB/s on a good day. The one thing I was toying around with is a dedicated NIC and router just for the NAS200. I have a netgear WNR3500 hooked up to a Netgear ethernet Gigabyte card GA311. The router has a DMA2100 windows media center extender and the motorola cable modem hooked up to it. The DMA2100 is not always on. I also have a WRT54G linksys router just collecting dust. I will be hooking this up Saturday straight to the onboard LAN 100/10 and to the NAS200, just to see if this makes it faster.
  5. alejandro_liu

    alejandro_liu Addicted to LI Member

    My guess is that it wont make much of a difference. You have to have a really congested network in order for that to matter.

    On ext2, the rumour is that it is supported on the latest firmware. It does not make use of a journal like xfs (the default under previous firmware releases). This means that it would make writing to the filesystem faster. On the other hand, recovering from a power outage will be slower.

    Note that converting from xfs to ext2 will require to reformat discs. That means that unless you want to loose data, you will have to back-up.
  6. alejandro_liu

    alejandro_liu Addicted to LI Member

    I just realised it but probably a good way to "reduce" the functionality of the NAS200 is to instead use NFS (or any file level) protocol is to use a block level protocol.

    This means that the NAS200 would not need to deal with the filesystem (i.e. reducing the stuff it needs to do).

    In Linux this can be done with NBD (Network Block Device), AoE (ATA over Ethernet) and iSCSI (Internet SCSI).

    Of these, the lightest implementation is AoE.
  7. What you're proposing is turning the NAS200 into a SAN200 then. I'm not sure if that's the "right" way to go from a user's standpoint. Sure, it's simpler, but then the "problem" of needing a client that understands the SAN's filesystem crops up.

    However, you're absolutely right that the NAS200 needs some serious optimizations when it comes to CPU usage.
  8. alejandro_liu

    alejandro_liu Addicted to LI Member

    I guess you are right there.

    While Linux usually has all the drivers needed, for Windows the AoE driver costs you $95 (which is probably too expensive for somebody who bough a NAS200... i.e. cheap hardware).

    On top of that you would need a suitable file system otherwise you will not be able to share those volumes with multiple SAN clients. In Linux you would use OCFS or GFS, but I don't know what would be available in Windows.
  9. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    I noticed that the Vista (home premium edition) on my new notebook has an iSCSI control panel applet... I wonder if that would work if we could make the NAS200 into a SAN... Of course it would probably be way too slow to be useful but it might be an interesting experiment nevertheless.

  10. alejandro_liu

    alejandro_liu Addicted to LI Member

    If you want to make a Linux iSCSI target you could use:


    In theory it should be just as fast (slow) as using ext2. The AoE option was attractive because the server side is available as an Kernel module (in principle should be faster).

    Again, I am not sure how useful this would be... but may be a fun afternoon experiment for someone.
  11. jackito

    jackito LI Guru Member

    Im thinking about trying AoE now. Since iSCSI wasn't all the fast that I expected and also a big CPU eater. I have nothing to loose, as you said may be just a fun afternoon.
    The only thing I would like is to shrink my RAID-1 so I can get spare space for a new partition to test iSCSI direct access performance and of course AoE if I get it running at all. My problem is that I still don´t know if mdadm --grow is not only shrinking the logical RAID but also the FD partition. I need to find a way to shrink the RAID-1 without destroying it. :frown:
  12. alejandro_liu

    alejandro_liu Addicted to LI Member

    MDADM --grow will not shrink the partition. This follows UNIX phylosophy where a tools only does ONE job (well). So MDADm shrinks the RAID only.

    For shrinking you need to follow this order:

    1) Resize fs (resize2fs for ext2/ext3). This needs to be done with the filesystem umounted.

    2) If using LVM, lvresize the logical volume, follow by pvresize the physical volume. If not using LVM, you can skip this step.

    3) Resize using mdadm.

    4) Finally resize the partition using fdsik.
  13. jackito

    jackito LI Guru Member

    That´s what I suspected. So I will really need to think about doing this. The last time I mess with partitions I screw up everything. The NAS200 didn´t recognize the arrays. I had to "reset" it and restore 120GB from the backup USB drive that took almost a day or maybe a little more...
    Do you think it worth it? I would really like to know for sure if with direct access iSCSI or even AoE (if I can make it work) can get a few more MB/s (not KB/s) from the NAS200, but thinking of restoring everything again just because of a test is not so funny...
  14. alejandro_liu

    alejandro_liu Addicted to LI Member

    How much improvement one would get out of iSCSI or AoE is difficult to answer.

    When I measured performance in this thread using netcat and dd (i.e. without any protocols) I would get 7MB/s in writes and 4MB/s in reads.

    My suggestion, is just leave it alone for now.
  15. jackito

    jackito LI Guru Member

    I think I will take your advice. Anyway just for fun I will try to make AoE work and if possible using a regular file as the "block device" the same way I actually use iSCSI.
    In the future IF we can improve the performance of the NAS200 maybe it will be usefull. Also I read everywhere that it is supposed to be lighter and faster than iSCSI. So maybe even now I can get little better performance, who knows...

    I was thinking about opening a new thread to focus only on improving the NAS200 performance (ie: software (kernel, apps optimization) and IF possible hardware (ie: CPU clock). What do you think?

Share This Page