From owner-freebsd-current@FreeBSD.ORG Tue Mar 30 11:09:43 2004 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 3B6CE16A4CE; Tue, 30 Mar 2004 11:09:43 -0800 (PST) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF51543D1D; Tue, 30 Mar 2004 11:09:42 -0800 (PST) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id A56C85308; Tue, 30 Mar 2004 21:09:41 +0200 (CEST) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id AF6A8530C; Tue, 30 Mar 2004 21:09:35 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id 9940533CAA; Tue, 30 Mar 2004 21:09:35 +0200 (CEST) To: Robert Watson References: From: des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=) Date: Tue, 30 Mar 2004 21:09:35 +0200 In-Reply-To: (Robert Watson's message of "Tue, 30 Mar 2004 13:45:24 -0500 (EST)") Message-ID: User-Agent: Gnus/5.090024 (Oort Gnus v0.24) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on flood.des.no X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=no version=2.63 cc: current@freebsd.org Subject: Re: performance of jailed processes 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: Tue, 30 Mar 2004 19:09:43 -0000 Robert Watson writes: > - DNS -- I know you mentioned it, but I'd check anyway. Especially if > resolv.conf has bad DNS servers in it in the jails, etc. You might try > writing a trivial gethostbyname() test app and timing it in and out of > the jail. Also look at the reverse lookup done by the MySQL server. > The impact of the source IP address might be particularly interesting. Packet traces already show that there is no delay between query and reply, the reply just takes a long time to transmit. > - It would be interesting to know if applications outside the jail bound > to various IP addresses see performance differences depending on the IP > used. We have hashed IP address lookup, but there are some operations > in the stack that require walking the list of addresses, etc. If the > non-jailed software always uses the first address because they're all in > the same subnet, that might conceivably make a difference. Taking jail > out of the picture in some basic micro-benchmarks might help here also.= =20 Non-jailed software always uses the first IP address, which is in its own subnet. The jails draw from a pool of ~1000 IP addresses on the same interface, but in a different subnet. The jail I've been testing in is about a quarter of the way down the list. > Can you identify any micro-benchmarks rather than macro-benchmarks that > reflect a significant difference? haven't had much luck with that... fetch, for instance, doesn't seem to suffer, but with mysql the difference is dramatic: (outside jail) 1 row in set (0.01 sec) (inside jail) 1 row in set (13.20 sec) note that 13 seconds is far too short for a DNS issue, and that the time reported is measured *after* login (i.e. after any DNS lookup) DES --=20 Dag-Erling Sm=F8rgrav - des@des.no