From owner-freebsd-questions@FreeBSD.ORG Wed Dec 6 22:54:09 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9329A16A50B for ; Wed, 6 Dec 2006 22:54:09 +0000 (UTC) (envelope-from freebsd@sopwith.solgatos.com) Received: from schitzo.solgatos.com (pool-71-245-104-192.ptldor.fios.verizon.net [71.245.104.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0FB543EC5 for ; Wed, 6 Dec 2006 22:50:56 +0000 (GMT) (envelope-from freebsd@sopwith.solgatos.com) Received: from schitzo.solgatos.com (localhost.home.localnet [127.0.0.1]) by schitzo.solgatos.com (8.13.8/8.13.6) with ESMTP id kB6MpcYc025950 for ; Wed, 6 Dec 2006 14:51:38 -0800 Received: from sopwith.solgatos.com (uucp@localhost) by schitzo.solgatos.com (8.13.8/8.13.4/Submit) with UUCP id kB6MpcBZ025947 for freebsd-questions@freebsd.org; Wed, 6 Dec 2006 14:51:38 -0800 Received: from localhost by sopwith.solgatos.com (8.8.8/6.24) id WAA17265; Wed, 6 Dec 2006 22:46:26 GMT Message-Id: <200612062246.WAA17265@sopwith.solgatos.com> To: freebsd-questions@freebsd.org Date: Wed, 06 Dec 2006 14:46:26 +0000 From: Dieter Subject: Re: TCP parameters and interpreting tcpdump output X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd@sopwith.solgatos.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2006 22:54:09 -0000 I found a couple more things that don't look right. 000017 IP bsd.63743 > src.65001: . ack 52 win 65535 000107 IP bsd.63743 > src.65001: . ack 52 win 65535 000012 IP bsd.63743 > src.65001: F 52:52(0) ack 52 win 65535 000005 IP bsd.63743 > src.65001: F 52:52(0) ack 52 win 65535 000172 IP src.65001 > bsd.63743: . ack 53 win 4096 000004 IP src.65001 > bsd.63743: F 52:52(0) ack 53 win 4096 000003 IP src.65001 > bsd.63743: . ack 53 win 4096 000016 IP bsd.63743 > src.65001: . ack 52 win 65535 000011 IP bsd.63743 > src.65001: . ack 53 win 112 <------ why does the window suddenly shrink? 002366 IP src.rfe > bsd.12340: P 1:1317(1316) ack 1 win 4096 099554 IP bsd.12340 > src.rfe: . ack 1317 win 65535 <------ why does it take 99.5 millisec to ack? The ack time is normally 12 or 13 microseconds, which seems to be okay. But 99.5 milliseconds is *way* too slow, data will be lost. Is TCP sitting around waiting for a second packet, so that it can be "efficient" and ack two packets at once? What can I do to fix this? Is there a knob I can turn to say "ack every packet", or "only wait xxx microseconds for a 2nd packet" ? Data is generated in real-time, and the src box only has a small buffer. The bsd box is more than fast enough overall, but I keep finding cases where the latency to ack a packet is way too long. The process reading port 12340 has a very large circular buffer. The process is running at rtprio 5. Other processes are running at normal default priority. Machine is basically idle. Suggestions on how to lower the worst case latency welcome.