From owner-freebsd-stable Mon Nov 16 09:21:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA03412 for freebsd-stable-outgoing; Mon, 16 Nov 1998 09:21:06 -0800 (PST) (envelope-from owner-freebsd-stable@FreeBSD.ORG) Received: from public.bta.net.cn (public.bta.net.cn [202.96.0.97]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA03405 for ; Mon, 16 Nov 1998 09:21:03 -0800 (PST) (envelope-from robinson@public.bta.net.cn) Received: (from robinson@localhost) by public.bta.net.cn (8.9.1/8.9.1) id BAA26218 for freebsd-stable@freebsd.org; Tue, 17 Nov 1998 01:20:31 +0800 (GMT) Date: Tue, 17 Nov 1998 01:20:31 +0800 (GMT) From: Michael Robinson Message-Id: <199811161720.BAA26218@public.bta.net.cn> To: freebsd-stable@FreeBSD.ORG Subject: writev() to tcp Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'm working with ORBit under FreeBSD 2.2.7. The ORBit IIOP driver makes extensive use of writev. I've noticed this very wierd thing: with a total writev buffer of 160 bytes, the tcp socket is sending the first 100 bytes (on a segment boundary), waiting for a tcp ack on the socket, and then sending the remaining 60 bytes. Here's a tcpdump: 01:11:33.789875 localhost.2358 > localhost.2359: P 1441:1541(100) ack 891 win 57344 (DF) 01:11:33.970016 localhost.2359 > localhost.2358: . ack 1541 win 57344 (DF) 01:11:33.970223 localhost.2358 > localhost.2359: P 1541:1601(60) ack 891 win 57344 (DF) Obviously, a gratuitous 200ms delay in the middle of every transaction is not exactly what you want in your CORBA library. But the bigger question in my mind is, why is the tcp socket flushing its buffer in the middle of the writev, instead of at the end (or when the buffer gets full, whichever comes first)? Comments? -Michael Robinson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message