From owner-freebsd-current@FreeBSD.ORG Tue Mar 30 11:56:23 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 16C7B16A4CE; Tue, 30 Mar 2004 11:56:23 -0800 (PST) Received: from darkness.comp.waw.pl (unknown [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id F091843D3F; Tue, 30 Mar 2004 11:56:21 -0800 (PST) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 2F41AACAF4; Tue, 30 Mar 2004 21:56:20 +0200 (CEST) Date: Tue, 30 Mar 2004 21:56:20 +0200 From: Pawel Jakub Dawidek To: Dag-Erling Sm?rgrav Message-ID: <20040330195620.GH8930@darkness.comp.waw.pl> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="znFrcFTOc9PDN8kJ" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: Robert Watson 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:56:23 -0000 --znFrcFTOc9PDN8kJ Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 30, 2004 at 09:09:35PM +0200, Dag-Erling Sm?rgrav wrote: +> > Can you identify any micro-benchmarks rather than macro-benchmarks that +> > reflect a significant difference? +>=20 +> haven't had much luck with that... fetch, for instance, doesn't seem +> to suffer, but with mysql the difference is dramatic: +>=20 +> (outside jail) +> 1 row in set (0.01 sec) +>=20 +> (inside jail) +> 1 row in set (13.20 sec) +>=20 +> 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) I'm wondering if this piece of code is responsible for this delay: (sys/netinet/in_pcb.c:551) if (laddr.s_addr =3D=3D INADDR_ANY && jailed(socred)) { bzero(&sa, sizeof(sa)); sa.sin_addr.s_addr =3D htonl(prison_getip(socred)); sa.sin_len =3D sizeof(sa); sa.sin_family =3D AF_INET; error =3D in_pcbbind_setup(inp, (struct sockaddr *)&sa, &laddr.s_addr, &lport, cred); if (error) return (error); } Maybe you can test it by putting a printf() after this if() and check if it is printed with fetch and with mysql. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --znFrcFTOc9PDN8kJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAadDkForvXbEpPzQRAocwAJ9CRyst2AoSwS+BznjRo4tG6l6uYQCcCZNq 7yQ1/Djqc79vmixvVZJrbIw= =oZyv -----END PGP SIGNATURE----- --znFrcFTOc9PDN8kJ--