D-Link Forums

The Graveyard - Products No Longer Supported => DNS-323 => D-Link Storage => Beta code! => Topic started by: stillerz on September 02, 2009, 07:48:55 AM

Title: Performance tuning for file copying to the NAS
Post by: stillerz on September 02, 2009, 07:48:55 AM
Hi,

I just installed a brand new DNS-323 with v1.08 beta firmware and two new 1.5TB LP drives from Seagate, and I'm not seeing the performance I was hoping for in copying files from my laptop to the NAS.

I copied about 100Mb of files and saw only a 4 MB/s transfer rate as reported by the Vista file copy.  I would like that to be much higher, so I'm wondering if anyone can help with the tuning or troubleshooting of the bottleneck?

The laptop is a Dell Studio 1737 running Vista SP2.  The DNS-323 is plugged directly into the Dlink DIR-655 gigabit router, and the laptop is connected wirelessly using a 802.11n connection, that Vista reports at 130Mb/s.

I did enable jumbo frames on the DNS-323 control panel.

What else should I do?

Thanks!
Title: Re: Performance tuning for file copying to the NAS
Post by: gunrunnerjohn on September 02, 2009, 09:50:32 AM
Your problem is the wireless link. Although you see a raw bit rate of 130mbits, the actual througput on an 802.11x connection will rarely be half that.  In addition, the half-duplex nature of wireless connections slows down the SMB protocol used here, since there is a lot of return traffic.

Connect with a wired connnction with gigabit all around, and you should see the 15-16 mbytes/sec that the unit is capable of.
Title: Re: Performance tuning for file copying to the NAS
Post by: fordem on September 02, 2009, 11:00:14 AM
Another point to be aware of - file size - small file sizes affect throughput tremendously, you can achieve as much as 25~30MBytes/sec when copying multi gigabit files, using a gigabit jumbo frame connection (assuming that your PCs can accomodate it) but, as the file size drops, so does the throughput, all the way down to 0.5MBytes/sec average with files of a few megabytes.
Title: Re: Performance tuning for file copying to the NAS
Post by: krenkey on September 02, 2009, 12:08:57 PM
My 2 cents here, i run a wireless laptop to the dns 323 i found that when i use the vista file transfer i get horrible speeds but when i set up the ftp on the 323 my speeds went a lot higher i use the free filezilla ftp client works great. Ive also got one PC that is hard wired to the gigabit lan and the transfer speeds are approximately 18 to 19 MB/s steadily which i think is good since the PC has a small processor.
Title: Re: Performance tuning for file copying to the NAS
Post by: gunrunnerjohn on September 02, 2009, 12:35:48 PM
FTP will work better over wireless links, as the protocol is optimized for longer loop delays.  SMB pretty much assumes it's running on a local LAN with full duplex connections.
Title: Re: Performance tuning for file copying to the NAS
Post by: fordem on September 02, 2009, 01:21:51 PM
.... which i think is good since the PC has a small processor.

I think you'll find that the disk subsystems have a greater impact than the processor speed.

Just as an example I have a number of systems on hand here and two of them just happen to use very similar processors - 3.06GHz, hyperthreading Pentium IVs, both had 1GB of RAM and gigabit network interfaces - one system could consistently deliver 18~20MByte/sec throughput whilst the other would never get above 8MByte/sec.

The slower system is a desktop running Windows XPPro/sp3  with a single 80GB SATA drive and the faster system was a server running Windows Server 2003 standard edition with a pair of 250GB SATA drives in a RAID1 array.  The server has since been upgraded to 3GB of RAM, Windows Server 2008 standard edition with three 250GB drives in a RAID5 array, and throughput has dropped considerably - whilst I don't remember the exact numbers, the write speed (writing to the DNS-323) is considerably higher than the read speed (reading from the DNS-323), due to the write bottlenecking that occurs with the RAID5 array on the server.
Title: Re: Performance tuning for file copying to the NAS
Post by: gunrunnerjohn on September 02, 2009, 01:30:35 PM
I did a number of throughput tests when trying to sort out a Vista issue, they're posted below.

Although the processors differ, all are at least 2.4ghz dual-core machines or better, and all have 2gigs or more memory.  I have gigabit all around.


Tests from Win7 64-bit machine to Vista and XP.
----------------------
Win7 to XP      20 mbyte/sec
XP to Win7      38 mbyte/sec

Win7 to Vista   3 mbyte/sec .. Autotuning=normal
Vista to Win7   3 mbyte/sec .. Autotuning=normal

Win7 to Vista   36 mbyte/sec .. Autotuning=disabled
Vista to Win7   40 mbyte/sec .. Autotuning=disabled



Tests from Vista 32-bit to Win7 and XP.
-----------------------
Win7 to Vista   46 mbyte/sec
Vista to Win7   31 mbyte/sec

Vista to XP     20 mbyte/sec
XP to Vista     37 mbyte/sec



Tests from XP to Win7 and Vista.
-----------------------
XP from Vista   3 mbyte/sec .. Autotuning=normal
Vista from XP   3 mbyte/sec .. Autotuning=normal

XP from Vista   35 mbyte/sec .. Autotuning=disabled
Vista from XP   25 mbyte/sec .. Autotuning=disabled

XP from Win7    27 mbyte/sec
Win7 from XP    21 mbyte/sec


Tests from Win7 to D-Link DNS-323 (NAS)
---------------------------------
Win7 to DNS-323     17 mbyte/sec
Win7 from DNS-323   16 mbyte/sec
Title: Re: Performance tuning for file copying to the NAS
Post by: stillerz on September 02, 2009, 04:51:26 PM
Thanks for the benchmarks.  How does one disable the autotuning in Vista?
Title: Re: Performance tuning for file copying to the NAS
Post by: gunrunnerjohn on September 02, 2009, 05:38:49 PM
1. Open up an elevated command prompt.

2. Enter the following command to disable auto-tuning:

     netsh interface tcp set global autotuninglevel=disabled

If you decide to turn it back on again, use this command:

     netsh interface tcp set global autotuninglevel=normal
Title: Re: Performance tuning for file copying to the NAS
Post by: stillerz on September 03, 2009, 04:33:42 PM
Thanks, I tried disabling autotuning without any changes.  :-(

I tested with two different size copies (1) at 130Mb of smaller files and (2) at 7Gb of larger files.  The copy from Vista to DNS-323 speeds were the same with both folders.  The 130Mb transfer rate was still in the 4Mb/s range.  The 7Gb transfer peaked at about 6.5Mb/s.

I also tried copying the smaller copy (1) from the DNS-323 back to the laptop and got about 2.6Mb/s average speed.  Very bad.

Looking for any other ideas?  I will also try plugging the laptop into a wired port to see if that is the bottleneck. 
Title: Re: Performance tuning for file copying to the NAS
Post by: gunrunnerjohn on September 03, 2009, 04:42:31 PM
Odd, it works fine on my Vista Ultimate 32 bit machine.  I just enabled jumbo frames all around, and the Vista machine is reading and writing at around 18mbytes/sec, my Windows 7 machine is hitting 20mbytes/sec.

P.S.  You did reboot after disabling it, right?
Title: Re: Performance tuning for file copying to the NAS
Post by: stillerz on September 03, 2009, 05:46:24 PM
I just rebooted and tried again, but same result.

Is there something special I need to do to enable jumbo frames on Vista?
Title: Re: Performance tuning for file copying to the NAS
Post by: fordem on September 03, 2009, 07:19:53 PM
Search this forum for threads on speed testing - there is one in which I posted a link to a utility called NASTester, which was written specifically for the purpose of testing NAS read/write performance.
Title: Re: Performance tuning for file copying to the NAS
Post by: lizzi555 on September 04, 2009, 01:00:33 AM
@stillerz

If you are using wireless connection, disable Jumbo Frames.
They only work in a gigabit to gigabit connection.
Wireless uses its own frame size.

In a direct connection between a desktop with gigabit LAN and the DNS I received the best result with 4K Jumbo Frames. (18-19 MB/s)
With a wireless 11N 130 MBit connection I'm limited to 6-6,5 MB/s when transfering 1 large file.
It slows down to less than 1 MB/s with thousands of small .png or .jpg files.

Title: Re: Performance tuning for file copying to the NAS
Post by: gunrunnerjohn on September 04, 2009, 05:29:33 AM
I had the same experience with Jumbo frames, I tried 4k and 9k, and the 4k setting works best.

As stated, wireless will not allow jumbo frames.
Title: Re: Performance tuning for file copying to the NAS
Post by: fordem on September 04, 2009, 08:14:01 AM
The impact of jumbo frame size will vary with the network and also the file sizes being transferred - with small files there may be little point to using jumbo frame - for me it doesn't matter if I use 4K or 9K throughput is pretty much constant.

Also, whilst jumbo frame will not work with wireless - it is a gigabit only technology - there is no need to disable it when using wireless, as it will automatically negotiate the MSS or maximum segment size.

For clarity - in a mixed network where both gigabit with jumbo frame & wireless access are used, jumbo frame can be left enabled all the time.

A bit of network trivia now - jumbo frame is defined as an ethernet frame size larger than the default 1500 bytes - 802.11 allows framesizes upto 2327 bytes - so technically wireless does support jumbo frame.
Title: Re: Performance tuning for file copying to the NAS
Post by: stillerz on September 04, 2009, 08:48:05 AM
Assuming this is a wireless-related problem, are there settings in the network adapter properties that would make a difference?  I'm just using all the default settings currently.  The Dell Studio 1737 comes with the Dell 1510 Wireless-N Mini-Card.

I checked on the DIR-655 and there doesn't appear to be any wireless network tuning options that would help.  I'm just running all the default settings there anyway.
Title: Re: Performance tuning for file copying to the NAS
Post by: gunrunnerjohn on September 04, 2009, 11:22:52 AM
Again, I don't think you can expect much better over wireless links.  Did you try FTP, as it should give you a faster transfer over the same link.
Title: Re: Performance tuning for file copying to the NAS
Post by: stillerz on September 05, 2009, 05:06:37 PM
I did try ftp, but Vista doesn't show the transfer speed when copying a file using ftp, so I couldn't tell if it was faster.  It felt about the same, judging by the time it took to copy.
Title: Re: Performance tuning for file copying to the NAS
Post by: gunrunnerjohn on September 05, 2009, 05:17:03 PM
I copy a big file and use a stopwatch to time transfers. :)
Title: Re: Performance tuning for file copying to the NAS
Post by: stillerz on September 05, 2009, 05:23:28 PM
Thanks -- i could do that, but ftp really isn't going to work for me anyway.  I need to use a drive letter for the applications I'm working with to be able to save and copy files to that network drive.  FTP would add an extra step, which would take more time even if it was slightly faster.
Title: Re: Performance tuning for file copying to the NAS
Post by: gunrunnerjohn on September 05, 2009, 05:28:55 PM
I think you need to look into wired solutions.  Wireless just isn't going to be that fast for SMB transfers, that's just how it works. :)
Title: Re: Performance tuning for file copying to the NAS
Post by: stillerz on September 06, 2009, 06:06:53 PM
I did try connecting directly to the wired network on a port on the router (its a gigabit router) and my copy times from my Vista laptop only went up to about 6 Mb/s for a 130Mb folder copy (bunch of smaller files).  Got up to about 7.5 Mb/s on a large folder copy of 7Gb files.

I'm seeing the same performance from my Dell desktop also, which is a wired connection.

I was really hoping to see something in the 18Mb/s+ range, which makes me wonder if there isn't something wrong with the router v1.08 firmware or config.

Or, if I just have a defective DNS-323?
Title: Re: Performance tuning for file copying to the NAS
Post by: fordem on September 06, 2009, 06:14:13 PM
Does your laptop also have a gigabit connection?  Generally smaller files will transfer slower - you should see 18MByte/sec and higher with files of 1~2 GBytes.

By the way - Mb/s is generally used to indicate Megabits/sec, so to avoid confusion I spell it out  ;)

Title: Re: Performance tuning for file copying to the NAS
Post by: gunrunnerjohn on September 06, 2009, 06:39:30 PM
I get 18-20 mbyte/sec transfers each way from my DNS-323 on a gigabit connection formatted in RAID-1 with a pair of Samsung 1.5TB drives.  I'm running jumbo frames at 4kbit size, 9kbit didn't seem to have a positive effect.

I only get 8-9mbyte/sec on 100mbit links.
Title: Re: Performance tuning for file copying to the NAS
Post by: stillerz on September 07, 2009, 08:33:43 AM
Yes, both my laptop and desktop have gigabit wired connections, which is why I'm wondering if the problem is either with the DNS-323 itself or Vista.  I have another laptop that I can dual boot into XP that I'll try out also.
Title: Re: Performance tuning for file copying to the NAS
Post by: krenkey on September 08, 2009, 07:43:15 PM
get a ftp client filezilla is free and easy to use it will show you your speeds to the NAS
Title: Re: Performance tuning for file copying to the NAS
Post by: Oman on September 10, 2009, 02:50:14 PM
Is your laptop Vista as well?  I get about 1/2 the SMB speed out of Vista than I do with my XP box.  Both Gigabit connections and the Vista box has way more CPU and HD speed.

There are two things I did to Vista to even get up to that speed:

1) Turned auto-tune off on the network card in Vista.  Do a google search and you should find lots of info.
2) Don't browse to any directories on the NAS.  Vista seems to have this habit of reading EVERY BYTE OF EVERY FILE in the directory you browse to, in the background.  I suppose it is to try to get metadata or something.   I have some large directories and Vista can drive the NAS at 100% for 30 minutes by just bringing up the folder in Explorer.  You don't notice it on the host at all, but the NAS just gets hammered.

I like Vista except for the horrible network and explorer performance.

Jon
Title: Re: Performance tuning for file copying to the NAS
Post by: stillerz on September 10, 2009, 04:17:02 PM
Yes, I have two laptops and both run Vista.  One of the two is a dual-boot system, so I can run XP also.

Performance seems to be about the same regardless of the laptop or OS, which is why I started wondering if it was related to the network itself.

I have disabled autotuning on Vista, and didn't notice much difference.  I have not attempted to change any of the wireless or wired network card parameters via device manager though.  I didn't see any obvious looking options when I checked them out.