From owner-freebsd-current@FreeBSD.ORG Thu Feb 3 16:57:05 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C4E0616A4CE; Thu, 3 Feb 2005 16:57:05 +0000 (GMT) Received: from ylpvm29.prodigy.net (ylpvm29-ext.prodigy.net [207.115.57.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8DFF43D45; Thu, 3 Feb 2005 16:57:04 +0000 (GMT) (envelope-from mbsd@pacbell.net) Received: from sotec.home (adsl-64-168-27-117.dsl.snfc21.pacbell.net [64.168.27.117])j13Gumh3026015; Thu, 3 Feb 2005 11:56:49 -0500 Date: Thu, 3 Feb 2005 08:57:00 -0800 (PST) From: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= X-X-Sender: mikko@sotec.home To: Martin Blapp In-Reply-To: <20050203123816.A55976@cvs.imp.ch> Message-ID: <20050203085004.G21031@sotec.home> References: <20050203123816.A55976@cvs.imp.ch> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: freebsd-current@freebsd.org cc: Robert Watson cc: Chris Lightfoot Subject: Re: getline() very very slow on localhost on 5.X X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Feb 2005 16:57:05 -0000 Hi Martin, Judging by the tcpdump, I'd say tpop3d needs to setockopt(TCP_NODELAY). On Thu, 3 Feb 2005, Martin Blapp wrote: [...] > 12:57:37.443544 IP mx2i.53848 > mx1i.pop3: . ack 106497 win 34048 > 12:57:37.444256 IP mx1i.pop3 > mx2i.53848: P 106497:114689(8192) ack 0 win 34048 Pop server sends data. > 12:57:37.543486 IP mx2i.53848 > mx1i.pop3: . ack 114689 win 34048 100ms later - delayed ack from client. > 12:57:37.545426 IP mx1i.pop3 > mx2i.53848: P 114689:122881(8192) ack 0 win 34048 Pop server imediately sends some more data. > 12:57:37.644410 IP mx2i.53848 > mx1i.pop3: . ack 122881 win 34048 Another 100ms laterm another lone delayed ack from client. > 12:57:37.645402 IP mx1i.pop3 > mx2i.53848: P 122881:131073(8192) ack 0 win 34048 Etc... > 12:57:37.743474 IP mx2i.53848 > mx1i.pop3: . ack 131073 win 34048 > 12:57:37.744181 IP mx1i.pop3 > mx2i.53848: P 131073:139265(8192) ack 0 win 34048 > 12:57:37.843553 IP mx2i.53848 > mx1i.pop3: . ack 139265 win 34048 > 12:57:37.844312 IP mx1i.pop3 > mx2i.53848: P 139265:147457(8192) ack 0 win 34048 [...] Presumably FreeBSD doesn't do delayed acks and/or the Nagle algorithm on the loopback interface. $.02, /Mikko