I have an Apple iBook running OS X 10.2 connected to my network via an
802.11b wireless network. When I transfer files via SMB with my Windows
2000 computer, the speed seems reasonable. However, when I connect to a
share on my Debian (x86) box (kernel 2.4.19) running Samba 2.2.3a-12 for
Debian, the speed is only about a sixth as fast (transferring files to
or from the Win2k box is about 6 times faster).
I did some packet captures in the hope of figuring out something. First,
here's a piece of a transfer from the Win2k box (voga.jeffienet) to the
iBook (ibook.jeffienet). Sorry about the long lines.
870 10.080985 voga.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
871 10.084876 voga.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
872 10.086621 voga.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
873 10.090163 voga.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
874 10.093957 voga.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
875 10.094042 ibook.jeffienet voga.jeffienet TCP
49209 > netbios-ssn [ACK] Seq=1308141088 Ack=287400716 Win=65535 Len=0
876 10.098098 voga.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
877 10.099777 voga.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
878 10.101667 voga.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
879 10.105350 voga.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
880 10.109083 voga.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
881 10.111019 voga.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
882 10.111128 ibook.jeffienet voga.jeffienet TCP
49209 > netbios-ssn [ACK] Seq=1308141088 Ack=287409404 Win=65535 Len=0
883 10.115104 voga.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
884 10.117015 voga.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
885 10.120661 voga.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
886 10.122415 voga.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
887 10.126060 voga.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
888 10.126142 ibook.jeffienet voga.jeffienet TCP
49209 > netbios-ssn [ACK] Seq=1308141088 Ack=287416644 Win=65535 Len=0
Look closely at the packet times. Voga sends a series of data packets,
then ibook ACKs that group of packets. Notice that the ACK comes almost
immediately after the last data packet.
Now...take a look at a capture fragment for a file being sent from the
Linux box (castrovalva.jeffienet) to the iBook:
152 3.216323 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
153 3.219965 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
154 3.223540 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
155 3.227242 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
156 3.230733 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
157 3.230805 ibook.jeffienet castrovalva.jeffienet TCP
49208 > netbios-ssn [ACK] Seq=3113175768 Ack=1353220046 Win=65535 Len=0
158 3.236769 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
159 3.238683 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
160 3.242363 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
161 3.246103 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
162 3.248020 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
163 3.404769 ibook.jeffienet castrovalva.jeffienet TCP
49208 > netbios-ssn [ACK] Seq=3113175768 Ack=1353227286 Win=59332 Len=0
164 3.410756 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
165 3.410908 ibook.jeffienet castrovalva.jeffienet TCP
49208 > netbios-ssn [ACK] Seq=3113175768 Ack=1353228734 Win=65535 Len=0
166 3.412829 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
167 3.416726 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
168 3.420294 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
169 3.422117 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
170 3.605023 ibook.jeffienet castrovalva.jeffienet TCP
49208 > netbios-ssn [ACK] Seq=3113175768 Ack=1353234526 Win=60284 Len=0
171 3.610969 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
172 3.612829 castrovalva.jeffienet ibook.jeffienet NBSS
NBSS Continuation Message
173 3.612910 ibook.jeffienet castrovalva.jeffienet TCP
49208 > netbios-ssn [ACK] Seq=3113175768 Ack=1353237422 Win=65535 Len=0
Again, look closely at the relative packet times. This time, it appears
that ibook waits something like 180ms before it acks the group of data
packets. This is only a small snippet, but the pattern is consistent
throughout the transfer. When talking to the Debian Samaba server, the
iBook takes MUCH MUCH longer to send a lot of the ACKs. That accounts
for the slower transfer.
Now...the $64,000 question: what makes the iBook behave differently with
the Samba server than with the Win2k box? This is really frustrating,
because SMB really is the best way for me to move files around. The
authentication mechanism in NFS is braindead, and AppleTalk (using
Netatalk on the Linux box) doesn't allow filenames >31 bytes long. If I
can solve this speed problem, I'll have it made.
I will be happy to collect more data if someone can provide an
intelligent suggestion.
--Jeff McClure