Author Topic: Slow Transfer Rates to NAS  (Read 4261 times)

jimmejames

  • Guru
  • ****
  • Posts: 183
    • View Profile
Slow Transfer Rates to NAS
« on: October 14, 2008, 06:06:01 am »
I have 2 NAS's- a DNS-323 and a HP MediaSmart.   Both have exactly the same harddrive, but the Dlink (the DNS-323) is connected through the external network- using this:  http://wiki.linuxmce.org/index.php/Network_Attached_Storage.  The MediaSmart is connected to the internal network- it's plug-and-play  (I'll put it in the wiki). 

Both are connected using a 10/100 connection (my internal and external nics on the core are only 10/100). 

It takes ~20 minutes to copy 9 Gb to the DNS-323 and ~40 minutes to copy to the HP.  There are no excessive cable lengths (approx 20' on each) and everything is running cat5e, even though only at 100 mbps.

Comparing the devices configurations in the admin pages, I don't see anything substantially different- they're a little different because they're on different networks, but other than that, no major differences.

Any ideas on how to increase the speeds on the HP?  The DNS-323 is supposed to be notoriously slow.

Thanks for the help

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Slow Transfer Rates to NAS
« Reply #1 on: October 14, 2008, 02:28:04 pm »
jimmejames

There are a stack of reasons why this might be the case - but let me start by saying that on your HP you are getting roughly 30Mbps (or 30%). This is well within the normal range for a 100M NIC. Reasons that it might not be 100Mbps:

1) It will always be somewhat lower than the max, even if only by a few percent
2) CIFS is an extremely inefficient protocol, as is SMB - starting at the application layer, if your HP for any reason is slow in acknowledging a section, this will cause the transfer to slow down.
3) At the network layer, TCP must acknowledge every segment before the sender can start sending the next segment. If it is slow in doing so, this will cause the TCP back-off congestion mechanism to dramatically reduce the window size, which in turn causes the transfer rate to drop dramatically.
4) The switch can cause packet drops due to blocking or congestion, which forces retransmits. This also causes significant drops in transfer rate due to retransmitting data already transmitted and also due to the TCP congestion control mechanism backing off.
5) Auto speed and duplexing, or incorrect duplexing settings will cause collisions that massively impact transmit rates... often only in one direction.
6) A million other reasons!

Point 5 is unlikely as the performance impact would probably be much greater than you are experiencing. However, be aware that some NICs and switch ports don't play well together in auto-neg mode and cause this problem. You could try patching the HP directly to the internal NIC of the core. Assuming that at least one NIC does auto-crossover, you can then use ethtool to confirm that auto-neg is getting 100/Full duplex, then try the transfer again.

I assume that you are using KDE desktop to time these transfer rates? Try both "pushing" and "pulling" the data to see if there is any difference in each direction. This also goes to point 5.

Even on a quality 100M Cat5e LAN with an enterprise grade switch, I have often seen transfer rates to Windows machines around the 30-40M mark (although 60-70M is more common). Many NAS systems are based on Windows, so this has an impact. Be aware that in TCP transfers (particularly CIFS/SMB) the transfer rate can be highly variable. Windows machines not uncommonly ramp up very fast to 70M, then after a little while of consistent speed, suddenly back off to much slower, extremely variable speeds. Unless you are looking directly at the net utilisation whilst this happens, it isn't obvious and will just look like an overall slower speed.

Perhaps try the other NAS on the external network and compare speed.

On point 2 - perhaps try switching that NAS device to the other protocol - if it is currently CIFS (default) switch to SMBFS or vice versa.

NIC drivers and hardware compatibility between them and switches often causes performance problems. Try moving the NAS's from internal to external and vice versa to see if there is an element of that. And as I say, eliminating the switch as a cause is good too, by bypassing them and direct connecting. In this config (and others for that matter) ethtool is your friend and will tell you if the interfaces have autonegotiated the same speed and duplex settings. If you see 100/Half or worse 10/half then that is your problem.

Either way, I would recommend you move your HP NAS to the internal network anyway! There's no reason why a single rule on the core can't provide all the access to that NAS needed from the external network anyway....

Good luck!

jimmejames

  • Guru
  • ****
  • Posts: 183
    • View Profile
Re: Slow Transfer Rates to NAS
« Reply #2 on: October 14, 2008, 02:36:24 pm »
Wow-

Thanks colinjones- both for you very detailed explanation and for your contributions to this community!


I will experiment with what you mentioned and put my results in the wiki.


Thanks again

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Slow Transfer Rates to NAS
« Reply #3 on: October 14, 2008, 02:55:18 pm »
No problem - was just a brain dump, and not in a very logical order! There are a heap of other things to think of, and I have concentrated mostly on the network side. There are plenty of internal things too. I would suggest ruling out or in the network first by doing the moves I suggested. We can always tune the process once you have some results.... frankly I don't think 30M is too bad from the external network, but it could be better of course :) lets hope its something simple and we don't have to get out the packet sniffers ;) let me know how you go!

justdeb

  • Veteran
  • ***
  • Posts: 134
  • Hope to become good enough to teach others
    • View Profile
Re: Slow Transfer Rates to NAS
« Reply #4 on: October 15, 2008, 01:33:16 am »
Hi All,

I totally agree with Colins comments (sounds like someone plays in it!!), but would also like to suggest checking the HP site as there have been some issues with certain NAS units. A fellow colleague spent quite some time and eventually found a firmware upgarde which sorted out a number of problems. Whilst it didn't give him 100Mbps, it certainly increased the rate to around 55 - 60Mpbs.

I am also curious as to the method in which you are doing data transfer as i have found from my own experience that the old drag and drop method is considerably slower than FTP. I have also found that the size of files can have a big impact on the transfer rate particularly if the nics and or switches are not configured correctly.

Regards

Justin