From owner-freebsd-current@FreeBSD.ORG Thu Feb 3 12:19:22 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 6AD0616A4CE; Thu, 3 Feb 2005 12:19:22 +0000 (GMT) Received: from mx3.imp.ch (mx3.imp.ch [157.161.9.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id D830443D4C; Thu, 3 Feb 2005 12:19:20 +0000 (GMT) (envelope-from mb@imp.ch) Received: from mx3.imp.ch (localhost [127.0.0.1]) by mx3.imp.ch (8.12.11/8.12.11/Submit) with ESMTP id j13CJFXr086242; Thu, 3 Feb 2005 13:19:15 +0100 (CET) (envelope-from mb@imp.ch) Received: (from clamav@localhost) by mx3.imp.ch (8.12.11/8.12.11/Submit) id j13CJEOE086204; Thu, 3 Feb 2005 13:19:14 +0100 (CET) (envelope-from mb@imp.ch) Received: from cvs.imp.ch (cvs.imp.ch [157.161.4.9]) id j13CJ8S7093136; Thu, 03 Feb 2005 13:19:10 +0100 (CET) Date: Thu, 3 Feb 2005 13:19:08 +0100 (CET) From: Martin Blapp To: Robert Watson , Chris Lightfoot In-Reply-To: Message-ID: <20050203123816.A55976@cvs.imp.ch> References: 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 12:19:22 -0000 Hi, I've tested now a lot more and used the old qpopper server to compare the results. You are correct, it doesn't happen here with this application. But I found out something very strange with the tpop3d (the newer popserver which shows the problems) qpopper: -------- Case A (Using IP on the first NIC em0) real 0m1.083s user 0m0.198s sys 0m0.038 Case C (Using 127.0.0.1 on lo0) real 0m0.929s user 0m0.205s sys 0m0.025s Now to tpop3d: -------------- I tested one case more. I see the pop3 server sending a lot slower in case B+C. It doesn't matter if I use an IP alias or the real IP - I can even add some additional IP's which do not have any hostname, the result is the same. It doesn't matter if I access Case A or Case B externally or internally. The order of configured IP's within tpop3d.conf doesn't matter too. Btw, disable or enable PF did not have any effect. > (1) Try connecting to 127.0.0.1 instead of localhost? Case A (Using IP on the first NIC em0) real 0m2.971s user 0m0.248s sys 0m0.064s Case B (Using IP on the second NIC em1) real 0m32.697s user 0m0.247s sys 0m0.024s Case C (Using 127.0.0.1 on lo0) time perl test.pl >xxx real 0m32.164s user 0m0.218s sys 0m0.044s > (2) If the problem persists, try writing a C based client to do the same > thing? We see the same behaviour with normal mail clients. > (3) Use tcpdump on lo0 to create a packet trace? Thats part of the trace on em1 which has the same problems: [...] 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 12:57:37.543486 IP mx2i.53848 > mx1i.pop3: . ack 114689 win 34048 12:57:37.545426 IP mx1i.pop3 > mx2i.53848: P 114689:122881(8192) ack 0 win 34048 12:57:37.644410 IP mx2i.53848 > mx1i.pop3: . ack 122881 win 34048 12:57:37.645402 IP mx1i.pop3 > mx2i.53848: P 122881:131073(8192) ack 0 win 34048 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 12:57:37.943493 IP mx2i.53848 > mx1i.pop3: . ack 147457 win 34048 12:57:37.944268 IP mx1i.pop3 > mx2i.53848: P 147457:155649(8192) ack 0 win 34048 12:57:38.043582 IP mx2i.53848 > mx1i.pop3: . ack 155649 win 34048 12:57:38.045378 IP mx1i.pop3 > mx2i.53848: P 155649:163841(8192) ack 0 win 34048 12:57:38.143490 IP mx2i.53848 > mx1i.pop3: . ack 163841 win 34048 12:57:38.145353 IP mx1i.pop3 > mx2i.53848: P 163841:172033(8192) ack 0 win 34048 12:57:38.243562 IP mx2i.53848 > mx1i.pop3: . ack 172033 win 34048 12:57:38.244337 IP mx1i.pop3 > mx2i.53848: P 172033:180225(8192) ack 0 win 34048 12:57:38.343490 IP mx2i.53848 > mx1i.pop3: . ack 180225 win 34048 12:57:38.344244 IP mx1i.pop3 > mx2i.53848: P 180225:188417(8192) ack 0 win 34048 12:57:38.443551 IP mx2i.53848 > mx1i.pop3: . ack 188417 win 34048 12:57:38.444288 IP mx1i.pop3 > mx2i.53848: P 188417:196609(8192) ack 0 win 34048 12:57:38.543633 IP mx2i.53848 > mx1i.pop3: . ack 196609 win 34048 12:57:38.544416 IP mx1i.pop3 > mx2i.53848: P 196609:204801(8192) ack 0 win 34048 12:57:38.643569 IP mx2i.53848 > mx1i.pop3: . ack 204801 win 34048 12:57:38.644348 IP mx1i.pop3 > mx2i.53848: P 204801:212993(8192) ack 0 win 34048 12:57:38.743507 IP mx2i.53848 > mx1i.pop3: . ack 212993 win 34048 12:57:38.744292 IP mx1i.pop3 > mx2i.53848: P 212993:221185(8192) ack 0 win 34048 12:57:38.843849 IP mx2i.53848 > mx1i.pop3: . ack 221185 win 34048 12:57:38.844659 IP mx1i.pop3 > mx2i.53848: P 221185:229377(8192) ack 0 win 34048 12:57:38.943517 IP mx2i.53848 > mx1i.pop3: . ack 229377 win 34048 12:57:38.945711 IP mx1i.pop3 > mx2i.53848: P 229377:237569(8192) ack 0 win 34048 12:57:39.043582 IP mx2i.53848 > mx1i.pop3: . ack 237569 win 34048 12:57:39.044412 IP mx1i.pop3 > mx2i.53848: P 237569:245761(8192) ack 0 win 34048 [..] If needed, I can provide a dump of all connections. Martin