Date: Tue, 17 Nov 1998 01:20:31 +0800 (GMT) From: Michael Robinson <robinson@public.bta.net.cn> To: freebsd-stable@FreeBSD.ORG Subject: writev() to tcp Message-ID: <199811161720.BAA26218@public.bta.net.cn>
next in thread | raw e-mail | index | archive | help
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 <nop,nop,timestamp 51147 51147,nop,nop,cc 2011> (DF) 01:11:33.970016 localhost.2359 > localhost.2358: . ack 1541 win 57344 <nop,nop,timestamp 51147 51147,nop,nop,cc 2010> (DF) 01:11:33.970223 localhost.2358 > localhost.2359: P 1541:1601(60) ack 891 win 57344 <nop,nop,timestamp 51147 51147,nop,nop,cc 2011> (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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811161720.BAA26218>