From owner-freebsd-current@FreeBSD.ORG Thu Feb 3 09:39:25 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 CDB5F16A4CE for ; Thu, 3 Feb 2005 09:39:25 +0000 (GMT) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90E1F43D55 for ; Thu, 3 Feb 2005 09:39:25 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with SMTP id C861C46B24; Thu, 3 Feb 2005 04:39:24 -0500 (EST) Date: Thu, 3 Feb 2005 09:38:37 +0000 (GMT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Martin Blapp In-Reply-To: <20050203090924.G55976@cvs.imp.ch> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org 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 09:39:25 -0000 On Thu, 3 Feb 2005, Martin Blapp wrote: > Can someone confirm that this is still a problem on 6.X ? Something is > really broken here ... Could you: (1) Try connecting to 127.0.0.1 instead of localhost? (2) If the problem persists, try writing a C based client to do the same thing? (3) Use tcpdump on lo0 to create a packet trace? What leads you to conclude that getline() is the problem, as opposed to the pop server, etc? Robert N M Watson > > Martin > > FreeBSD 5.x connecting to localhost > > time perl5.6.1 -MIO::Socket -e '$s = new IO::Socket::INET("localhost:110"); > $s->print("user USER\r\n"); > $s->getline(); $s->print("pass PASS\r\n"); $s->getline(); $s->print("LIST\r\n"); > for ($i = 1; $i > < 2000; ++$i) { $j=1 + $i%500;$s->print("top $j 0\r\n"); } > $s->print("quit\r\n"); while (defined($_ > = $s->getline())) { print $_; }' > xxx > > real 2m9.509s > user 0m0.559s > sys 0m0.184s > > FreeBSD 5.x connecting to the external IP of the server > > time perl -MIO::Socket -e '$s = new IO::Socket::INET("server:110"); > $s->print("user USER\r\n"); > > $s->getline(); $s->print("pass PASS\r\n"); $s->getline(); > $s->print("LIST\r\n"); > for ($i = 1; $i > > < 2000; ++$i) { $j=1 + $i%500;$s->print("top $j 0\r\n"); } > $s->print("quit\r\n"); while (defined($_ > > = $s->getline())) { print $_; }' > xxx > > real 0m6.932s > user 0m0.553s > sys 0m0.187s > > Martin Blapp, > ------------------------------------------------------------------ > ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH > Phone: +41 61 826 93 00 Fax: +41 61 826 93 01 > PGP: > PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E > ------------------------------------------------------------------ > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >