From owner-freebsd-net@FreeBSD.ORG Sun Jan 2 13:16:19 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B445816A4CE for ; Sun, 2 Jan 2005 13:16:19 +0000 (GMT) Received: from poczta.o2.pl (mx2.go2.pl [193.17.41.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5DC1E43D1F for ; Sun, 2 Jan 2005 13:16:18 +0000 (GMT) (envelope-from knockefreebsd@o2.pl) Received: from ALFA (aaf223.warszawa.sdi.tpnet.pl [217.97.85.223]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by poczta.o2.pl (Postfix) with ESMTP id D331660292 for ; Sun, 2 Jan 2005 14:16:15 +0100 (CET) Message-ID: <002e01c4f0cd$8e986350$df5561d9@ALFA> From: "Heinz Knocke" To: Date: Sun, 2 Jan 2005 14:17:45 +0100 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Subject: Speed problem - smbclient doesn't send duplicate ACKs in case of pacekt loss X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Heinz Knocke List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jan 2005 13:16:19 -0000 Hi! I'm not sure if this is an OS or Samba problem, so I send similar questions to both: FreeBSD related list and Samba. 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. 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? Samba: 3.0.7 both smbclient and server, compiled from FreeBSD ports totaly basic, default smb.conf, with TCP_NODELAY socket option only hardware details: Intel P4 2.8 Ghz , 512 MB RAM SATA HDDs (capable of giving the test file with a speed of 52 MB/s when writing to RAM directly) net: Marvell Gigabit Ethernet 32bit PCI NICs, using 9K jumbograms capable of doing about 720 Mbps bandwith for TCP application (meassured with netperf after link layer tuning). OS: FreeBSD 5-STABLE (Dec 19 20:48:37) packet dumps: server: 1104512342.542532 IP 10.10.10.1.445 > 10.10.10.2.49821: P 3807194718:3807198814(4096) ack 1971888923 win 32768 1104512342.542541 IP 10.10.10.1.445 > 10.10.10.2.49821: P 3807198814:3807202910(4096) ack 1971888923 win 32768 1104512342.542872 IP 10.10.10.2.49821 > 10.10.10.1.445: . ack 3807194718 win 31744 1104512342.635501 IP 10.10.10.2.49821 > 10.10.10.1.445: . ack 3807198814 win 32768 1104512342.956050 IP 10.10.10.1.445 > 10.10.10.2.49821: P 3807198814:3807202910(4096) ack 1971888923 win 32768 client: 1104516217.899613 IP 10.10.10.1.445 > 10.10.10.2.49821: P 3807194718:3807198814(4096) ack 1971888923 win 32768 1104516217.899629 IP 10.10.10.2.49821 > 10.10.10.1.445: . ack 3807194718 win 31744 1104516217.992217 IP 10.10.10.2.49821 > 10.10.10.1.445: . ack 3807198814 win 32768 1104516218.313000 IP 10.10.10.1.445 > 10.10.10.2.49821: P 3807198814:3807202910(4096) ack 1971888923 win 32768 smb.conf: [global] workgroup = MYGROUP server string = Samba Server security = user interfaces = 10.10.1.98,10.10.10.1 log file = /var/log/samba/log.%m max log size = 50000 log level = 1 socket options = TCP_NODELAY dns proxy = no [homes] comment = Home Directories browseable = no writable = yes [test] comment = export SATA path = /mnt/sata/test guest ok = yes read only = yes