Speed problem - smbclient doesn't send duplicate ACKs in case of pacekt loss

Richard Sharpe rsharpe at richardsharpe.com
Sun Jan 2 18:36:50 GMT 2005

On Sun, 2 Jan 2005, Heinz Knocke wrote:

> So, I'm trying to tune samba on my two directly linked boxes and
> encountered a strange problem.
> When serving one big (1-2GB file) locally over lo0 transmission
> reaches speed of about 32 MB/s which is OK.  But when doing the very
> same thing over the network, speed drops to 10 MB/s. It's so because
> of quite often single packet drops, which are detected by the server
> only using RTO timeout. Smbclient simply doesn't send duplicate ACKs
> to show that sth is missing, so server needs to wait whole RTO (as
> long as ab. 300ms) and then resends missing packet, transmissions
> resumes. Such beahovior appears every few seconds. Of course in result
> of congestion window drop, speed is very unstable, raising with the
> cwnd and dropping rapidly after RTO timeout. Thats why i think the
> average speed is so low.

Do you have a capture? Samba cannot control the sending of ACKs. That is
in the TCP layer.

Are you sure it is because of the packet drops and not say, that you have
disabled TCP_NODELAY on the sender? SMB is a sync half-duplex type of
protocol, in that you have the send a request and receive the response
before you can send another request.

> My general question is why it happens and what can I do about it? Is
> it a samba side problem or OS' ? I don't expect to be the latter,
> because netperf TCP stream gives as much as 720 Mbps.
> One thing that specially makes me wonder, is that theoretically client
> doesnt need to send duplicate ACK, because the missing segment is the
> last in the burst sent (see packet dump extract below). So it may not
> know if it's just missing or never sent. What should the TCP do then,
> what may I tune?

Can you send that as a raw TCPDUMP attachment?

Richard Sharpe, rsharpe[at]richardsharpe.com, rsharpe[at]samba.org,
sharpe[at]ethereal.com, http://www.richardsharpe.com

More information about the samba-technical mailing list