Jump to content

Painfully Slow SMB File Transfers


  • Please log in to reply
21 replies to this topic

#1
poondoggle

poondoggle

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
Hey Guys and Gals,

I have been running JaS's 10.4.6 for a while now and everything is working great except one thing. I have a file server running Windows Media Center Edition and any time I try and move files from OSX to XP I am getting really slow rates. I have three computers connected through a D-Link DGL-4300 (Wireless Router w/ 4 Gigabit ports). I have tested file transfers from every machine and while I'm not getting great throughput, it is obviously better than 100Mbit has been. That is except for the machine running 10.4.6. I ran Net Monitor and tried transferring a 2.7GB file to my file share and it averaged 2MB/sec.

I have tried a number of things to try and remedy the problem. First I booted to XP from my OSX box. I wanted to make sure there wasn't an issue with either the card or the net cable. From XP the file copy was very fast. I made modifications to the smb.conf file. There were a couple of posts outside of these forums that discussed slow SMB performance. Neither of the changes I made helped in any way. I tried IPNetTunerX thinking that adjusting the TCP Window Size might help but no such luck.

When I run Internet speed tests on the OSX box they score every bit as well as XP. Also if I copy a file from XP to OSX it is fast as well. It only affects sending. Is there a good packet sniffer for OSX that will capture everything? If I could at least see what is going over the wire it might clue me in a bit. I tried using one from my Windows XP box but it didn't seem to support promiscuous mode so I wasn't able to capture the entire subnet.

Any ideas would be great. Oh one other note. I am not using any special drivers. The default drivers from 10.4.6 found my Gigabit card. I am not sure if typically the card will actually show up in System Profiler with the card name, etc. But mine does not. It is just listed as "Built-in Ethernet". Also it does show up with Full Duplex, flow-control for the Media Options and 1000baseT as the Media Subtype.

Any ideas on how to tackle this would be greatly appreciated. It appears to be the last thing I need for this machine to be 100%.

TIA,

Rich

#2
Rammjet

Rammjet

    InsanelyMac V.I.P.

  • Gurus
  • 5,302 posts
  • Gender:Male
MacFixit reported a problem with Intel Macs and Windows Sharing. Maybe the article has something to offer you:

http://forum.osx86pr...showtopic=19664

#3
poondoggle

poondoggle

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts

MacFixit reported a problem with Intel Macs and Windows Sharing. Maybe the article has something to offer you:

http://forum.osx86pr...showtopic=19664


Thanks for the reply Ramm. Your other posts have proved to help me a great deal especially since we have the same MB. But the problem you posted was more about high CPU spiking. I am not seeing that, just really slow transfers to my file server. :P

#4
emunateD

emunateD

    InsanelyMac Protégé

  • Members
  • Pip
  • 8 posts
I too was experiencing a severe slowness in SAMBA....what worked for me was a free program called Cocktail, http://www.maintain....l/download.html

It a set of various tweaks for OS X, Go under Network/LAN and optimize settings for a T3 Line. This will make the required changes in your network settings and you should be good to go.

#5
poondoggle

poondoggle

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts

I too was experiencing a severe slowness in SAMBA....what worked for me was a free program called Cocktail, http://www.maintain....l/download.html

It a set of various tweaks for OS X, Go under Network/LAN and optimize settings for a T3 Line. This will make the required changes in your network settings and you should be good to go.


I just tried it and it actually seemed to make it worse. :P It dropped from an average of 2MB/sec down to 800k/sec. I wish I could figure this out. It's an elusive bugger. Thanks for the reply though.

#6
Rammjet

Rammjet

    InsanelyMac V.I.P.

  • Gurus
  • 5,302 posts
  • Gender:Male

Thanks for the reply Ramm. Your other posts have proved to help me a great deal especially since we have the same MB.


Thanks. I have never used my motherboard because, like many other people, mine was dead on arrival. When it gets here this week, I can finish building my hackintosh and then get to enjoy all the troubleshooting that the rest of you have.

#7
poondoggle

poondoggle

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
Still not working here. I've tried installing the Samba fix as well as looked into installing the Marvel Yukon driver since there isn't a named driver listed in the system profiler. I figured there was a problem there since it wasn't listed as a Yukon. What I see when copying a file is an initial burst of about 50-60MB but then after that drops to 2MB/sec for the remainder of the transfer.

Is there anyone else out there who has a the same NIC who is seeing anything remotely approaching Gigabit speed? I know that I won't see true Gigabit speed, but it would be nice to be able to get better than a really poor 100Mbit connection.

#8
ome.ijs

ome.ijs

    InsanelyMac Protégé

  • Members
  • Pip
  • 8 posts
Are you sure you don't have a duplex mismatch somewhere? Sure sounds like it..

Do a netstat -i on the mac to check for interface errors or colissions.

And I guess you can use TCPDUMP on OSX to dump packets.

#9
amdprophet

amdprophet

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 271 posts
  • Location:Surrey, BC, Canada
Maximum theoretical throughput for 100mbps is 12.5MB/s, but you will never reach that. I typically get around 2 - 6 MB/s with my cheap 100mbps switch built into my Linksys WRT54G. My assumption would be that your OS X machine is only transferring at 100mbps speeds. Also, how fast does OS X seem to you? If it doesn't seem to fast, it's possible it could be a hard drive compatibility issue limiting the read and write speeds which would affect transfer speesd.

#10
ut2211

ut2211

    InsanelyMac Protégé

  • Members
  • PipPip
  • 50 posts
  • Location:Italy
Try this:

sudo sysctl -w net.inet.tcp.delayed_ack=0

Then, if it works, put this command in /Library/StartupItems

#11
poondoggle

poondoggle

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts

Are you sure you don't have a duplex mismatch somewhere? Sure sounds like it..

Do a netstat -i on the mac to check for interface errors or colissions.

And I guess you can use TCPDUMP on OSX to dump packets.


I am not sure about the duplex mismatch. I am not aware of how to check that. I could have sworn I read it was full duplex. I will try your suggestions to see if there is anything apparent and I will post back.

Thanks!

Try this:

sudo sysctl -w net.inet.tcp.delayed_ack=0

Then, if it works, put this command in /Library/StartupItems


I think I tried this and it didn't make a difference. However I will try it again and let you know. Thanks :hysterical:

Maximum theoretical throughput for 100mbps is 12.5MB/s, but you will never reach that. I typically get around 2 - 6 MB/s with my cheap 100mbps switch built into my Linksys WRT54G. My assumption would be that your OS X machine is only transferring at 100mbps speeds. Also, how fast does OS X seem to you? If it doesn't seem to fast, it's possible it could be a hard drive compatibility issue limiting the read and write speeds which would affect transfer speesd.


Yeah I was thinking I was getting roughly the 100mbps speed. Actually everything under OSX seems really fast to me. In fact I am having major video blanking issues when I dual boot into XP, but under OSX video is perfect (go figure). ;)

#12
quixos

quixos

    InsanelyMac Legend

  • Retired
  • 943 posts
ut2211,

sudo sysctl -w net.inet.tcp.delayed_ack=0

THANK YOU :D

#13
poondoggle

poondoggle

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
Ok so I think I can see the problem. Not sure how to fix it however. When I go to System Profiler and I look at the properties for en0, for Media Options it shows: Full Duplex, flow-control and for Media Subtype it shows: 1000baseT, but when I run tcpdump -i en0 this is what it says:

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on en0, link-type EN10MB (Ethernet), capture size 96 bytes

I would assume that it believes my link-type is 10Mbit? If so is there a way to change it?

EDIT:

It appears that the EN10MB doesn't mean the link speed but is merely a designator for Ethernet 10/100/1000. I guess back to the drawing board.

#14
poondoggle

poondoggle

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts

Ok so I think I can see the problem. Not sure how to fix it however. When I go to System Profiler and I look at the properties for en0, for Media Options it shows: Full Duplex, flow-control and for Media Subtype it shows: 1000baseT, but when I run tcpdump -i en0 this is what it says:

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on en0, link-type EN10MB (Ethernet), capture size 96 bytes

I would assume that it believes my link-type is 10Mbit? If so is there a way to change it?

EDIT:

It appears that the EN10MB doesn't mean the link speed but is merely a designator for Ethernet 10/100/1000. I guess back to the drawing board.


Ok so I did some more testing. I used tcpdump and ran tcpdump -i en0 -w ~/foo.dmp. I then read the foo.dmp using Etherpeek NX for Windows and in a 12 second span there were 971 TCP Invalid Checksums, and 310 Inefficient Client Messages. This sounds really bad but I don't know if Etherpeek is reading something wrong or not. Any other good way to test this, and if I'm really getting that many Invalid Checksums is there a way to fix it?

UPDATE:

I performed multiple tests some going from OSX to my XP file server, and others going to my other desktop XP machine. The checksum errors occur a lot on both traces. When I do a tcpdump using the Windows version of the program and copy files from my desktop XP machine to my file server there are no errors. It's looking increasingly like the problem is with the drive in OSX or the configuration. I am at a loss for what it is. Does anyone out there have P5WD2-E Premium MB with the Marvell NIC and getting Gigabit or at least better than 10MB speed?



Thanks!

#15
poondoggle

poondoggle

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts

Ok so I did some more testing. I used tcpdump and ran tcpdump -i en0 -w ~/foo.dmp. I then read the foo.dmp using Etherpeek NX for Windows and in a 12 second span there were 971 TCP Invalid Checksums, and 310 Inefficient Client Messages. This sounds really bad but I don't know if Etherpeek is reading something wrong or not. Any other good way to test this, and if I'm really getting that many Invalid Checksums is there a way to fix it?

UPDATE:

I performed multiple tests some going from OSX to my XP file server, and others going to my other desktop XP machine. The checksum errors occur a lot on both traces. When I do a tcpdump using the Windows version of the program and copy files from my desktop XP machine to my file server there are no errors. It's looking increasingly like the problem is with the drive in OSX or the configuration. I am at a loss for what it is. Does anyone out there have P5WD2-E Premium MB with the Marvell NIC and getting Gigabit or at least better than 10MB speed?
Thanks!


Anyone else have any ideas or are running this particular board with 1000Mbit?

#16
RyanThaDude29

RyanThaDude29

    InsanelyMac Protégé

  • Members
  • PipPip
  • 93 posts
  • Gender:Male
  • Location:Indiana, USA
Have you checked in System Preferences/Network? Mine defaulted to 10baseT/UTP. Manually changed to 1000baseT and now it flies.

[edit] guess you've already tried that. Maybe need to pay closer attention :blink:

#17
poondoggle

poondoggle

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
I guess it is time to give up on this. :D I wish I could find someone else with the same motherboard who could test this. It is maddening.

#18
ut2211

ut2211

    InsanelyMac Protégé

  • Members
  • PipPip
  • 50 posts
  • Location:Italy

ut2211,

sudo sysctl -w net.inet.tcp.delayed_ack=0

THANK YOU :D


This command was first published by Maxxuss (where are you?) when he wrote the kext for VMware network card. Keep up with your great work Quixos!

#19
poondoggle

poondoggle

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
Ok, so I figured out the problem. Well at least mostly. It isn't anything on the OSX as far as I can tell. I had done some command line only copying of files that I used primarily to investigate the checksum errors I was getting. I figured that was the problem. After further review these errors can be erroneous especially when certain settings are enabled on your NIC. Once I found that out I decided to try using Finder to copy the files via drag and drop but I tried copying them to another computer. The speed was much better. Not blindingly fast but around 22MB/second.

So I then tried copying to the boot drive on my file server and it was also around the same speed. I then thought magic fairies had fixed my problem until I tried my file server drive. Ick! Back to 2MB/sec. The only difference and granted it is a big one is this file server drive is actually set up in a hardware RAID-5. But that should make this faster than the boot drive since it is only a single 80GB 7200RPM drive. The RAID-5 drives are all 250GB 7200RPM drives. My understanding is that RAID-5 provides both the speed of striping with the redundancy of parity. I know it may not be as fast as a true striped drive but I wouldn't think it would be 10x slower.

I am going to keep searching, but I don't know that there will be a fix. I already tried converting the RAID from a basic disk to dynamic in Windows XP's Computer Manager and it didn't help. So I will now add raid to my search regarding slow network transfer speed. Thanks to everyone who replied. I appreciate it and once I get this figured out I will perhaps post a how to so others may learn from my journey. ;)

EDIT:

One more item of note. The Intel 1000 Pro NIC on my file server is coming up with a speed of half my other two machines when I run the SiS Sandra's Throughput test. I wonder if it is due to the fact I have a 266 FSB Motherboard in it. Would that bus speed cause that much of a limitation? One of my other machines has the exact same NIC with the same drivers and it gets the full 55MB/sec instead of 25. The difference is it is a hyperthreaded 2.8Ghz proc.

#20
columbusgeek

columbusgeek

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 4 posts

Try this:

sudo sysctl -w net.inet.tcp.delayed_ack=0

Then, if it works, put this command in /Library/StartupItems



Thank you. Fixed my 100 mb in 44 mts problem.

I'm kinda vauge on adding this command to /Library/StartupItems as instructed. Do I add it to my StartupParameters.plist file?





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy