[Samba] Slow performance to samba server with OSX client

Poep Stamper poepstamper at gmail.com
Tue Apr 4 21:03:18 GMT 2006


Dear List,

I'm hoping there is someone that might give me some pointers to
solving the following problem. I run Mac OSX Tiger and perform a
filecopy using Finder to a samba share on a Gentoo Linux machine
running samba version 3.0.14a. Copying a 1GB file to the fileserver
takes roughly 2 hours (33,9 MB in 4 min). This means 142 kb/s over a
Gigabit network.

Now here is the strange thing:
When I log into the Gentoo box using SSH, during the filetransfer and
run tcpdump (dumping output through the terminal) the transfer speed
shoots up and the copying takes less than one minute. 700MB in 30
seconds, or 23 MB/s. I included a small piece of the tcpdump in the
hope it helps.
When I stop the tcpdump or route it to /dev/null the speed drops.
Whenever there is a process that constantly pushes information to the
ssh terminal the speed picks up again.

The Gentoo machine uses a realtek Gigabit nic (dmesg: r8169 Gigabit
Ethernet driver 1.2 loaded). The switch is also Gigabit as well as the
iMac (intel). The cable is correctly and completely wired.

1. the fileserver samba version is 3.0.14a
2. the samba configuration is vanilla (with one share added)
3. the realtek nic is in full duplex mode (see ethtool dump)
4. the imac samba version is 3.0.10
5. performance using scp is acceptable (11.5 MB/s)
6. setting the delayed_ack on the iMac to 0 makes hardly any
difference (still 2 hours)

Tweaking the samba config helps a little, but nowhere near the 23MB/s
I get when running tcpdump. I also thought it might have something to
do with lookups dns or lmhost or something, but that doesn't explain
this.

I'm lost.

Cheers,

Pim



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


----------- SCP COPY ----------------
VTS_01_2.VOB                                                          
                                   20%  206MB  11.5MB/s   01:11 ETA


------------- SMB CONF ---------------
Vanilla (from smb.conf.example)
+
[music]
   comment = Music
   path = /mnt/music
   public = yes
   writable = yes
   browseable = yes
   guest ok = yes



------------- ETHTOOL -----------------
fileserver everything # ethtool eth1
Settings for eth1:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Link detected: yes






------------ TCP DUMP ----------------

22:49:55.710260 IP 192.168.10.15.49392 > 192.168.10.12.139: .
86804678:86806126(1448) ack 76433 win 65535 <nop,nop,timestamp
232463412 17073752> NBT Packet
22:49:55.711544 IP 192.168.10.12.139 > 192.168.10.15.49392: . ack
86866186 win 17965 <nop,nop,timestamp 17073755 232463412>
22:49:55.712439 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12769520:12769712(192) ack 14593 win 2056 <nop,nop,timestamp 17073755
232463412>
22:49:55.712567 IP 192.168.10.15.49392 > 192.168.10.12.139: .
86866186:86867634(1448) ack 76484 win 65535 <nop,nop,timestamp
232463412 17073755> NBT Packet
22:49:55.714724 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12769904:12770096(192) ack 14593 win 2056 <nop,nop,timestamp 17073758
232463412>
22:49:55.714787 IP 192.168.10.15.49392 > 192.168.10.12.139: .
86927694:86929142(1448) ack 76535 win 65535 <nop,nop,timestamp
232463412 17073757> NBT Packet
22:49:55.716477 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12770448:12770640(192) ack 14593 win 2056 <nop,nop,timestamp 17073759
232463412>
22:49:55.716605 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12770640:12770832(192) ack 14593 win 2056 <nop,nop,timestamp 17073760
232463412>
22:49:55.716820 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12770992:12771184(192) ack 14593 win 2056 <nop,nop,timestamp 17073760
232463412>
22:49:55.716936 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12771184:12771376(192) ack 14593 win 2056 <nop,nop,timestamp 17073760
232463412>
22:49:55.717046 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12771376:12771568(192) ack 14593 win 2056 <nop,nop,timestamp 17073760
232463412>
22:49:55.717161 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12771568:12771760(192) ack 14593 win 2056 <nop,nop,timestamp 17073760
232463412>
22:49:55.717271 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12771760:12771952(192) ack 14593 win 2056 <nop,nop,timestamp 17073760
232463412>
22:49:55.717382 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12771952:12772144(192) ack 14593 win 2056 <nop,nop,timestamp 17073760
232463412>
22:49:55.717492 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12772144:12772336(192) ack 14593 win 2056 <nop,nop,timestamp 17073760
232463412>
22:49:55.717619 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12772336:12772528(192) ack 14593 win 2056 <nop,nop,timestamp 17073761
232463412>
22:49:55.717730 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12772528:12772720(192) ack 14593 win 2056 <nop,nop,timestamp 17073761
232463412>
22:49:55.717844 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12772720:12772912(192) ack 14593 win 2056 <nop,nop,timestamp 17073761
232463412>
22:49:55.717955 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12772912:12773104(192) ack 14593 win 2056 <nop,nop,timestamp 17073761
232463412>
22:49:55.718056 IP 192.168.10.15.49392 > 192.168.10.12.139: P
86988510:86989202(692) ack 76535 win 65535 <nop,nop,timestamp
232463412 17073757> NBT Packet
22:49:55.718058 IP 192.168.10.15.49296 > 192.168.10.12.22: . ack
12773104 win 65535 <nop,nop,timestamp 232463412 17073758>
22:49:55.719111 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12773456:12773648(192) ack 14593 win 2056 <nop,nop,timestamp 17073762
232463412>
22:49:55.720280 IP 192.168.10.12.139 > 192.168.10.15.49392: . ack
87050018 win 18309 <nop,nop,timestamp 17073763 232463412>
22:49:55.720697 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12773648:12773840(192) ack 14593 win 2056 <nop,nop,timestamp 17073764
232463412>
22:49:55.720922 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12774000:12774192(192) ack 14593 win 2056 <nop,nop,timestamp 17073764
232463412>
22:49:55.721033 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12774192:12774384(192) ack 14593 win 2056 <nop,nop,timestamp 17073764
232463412>
22:49:55.721144 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12774384:12774576(192) ack 14593 win 2056 <nop,nop,timestamp 17073764
232463412>
22:49:55.721254 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12774576:12774768(192) ack 14593 win 2056 <nop,nop,timestamp 17073764
232463412>
22:49:55.721365 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12774768:12774960(192) ack 14593 win 2056 <nop,nop,timestamp 17073764
232463412>
22:49:55.721475 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12774960:12775152(192) ack 14593 win 2056 <nop,nop,timestamp 17073764
232463412>
22:49:55.721603 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12775152:12775344(192) ack 14593 win 2056 <nop,nop,timestamp 17073765
232463412>
22:49:55.721714 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12775344:12775536(192) ack 14593 win 2056 <nop,nop,timestamp 17073765
232463412>
22:49:55.721824 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12775536:12775728(192) ack 14593 win 2056 <nop,nop,timestamp 17073765
232463412>
22:49:55.721934 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12775728:12775920(192) ack 14593 win 2056 <nop,nop,timestamp 17073765
232463412>
22:49:55.722044 IP 192.168.10.12.22 > 192.168.10.15.49296: P
12775920:12776112(192) ack 14593 win 2056 <nop,nop,timestamp 17073765
232463412>


More information about the samba mailing list