From owner-freebsd-current@FreeBSD.ORG Tue Mar 30 14:21:05 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 8307316A4CE; Tue, 30 Mar 2004 14:21:05 -0800 (PST) Received: from darkness.comp.waw.pl (unknown [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E5BD43D1D; Tue, 30 Mar 2004 14:21:05 -0800 (PST) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id EC87CACAFB; Wed, 31 Mar 2004 00:21:02 +0200 (CEST) Date: Wed, 31 Mar 2004 00:21:02 +0200 From: Pawel Jakub Dawidek To: Dag-Erling Sm?rgrav Message-ID: <20040330222102.GK8930@darkness.comp.waw.pl> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GI1PA4Sghwo1XriW" 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 22:21:05 -0000 --GI1PA4Sghwo1XriW Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 30, 2004 at 11:17:39PM +0200, Dag-Erling Sm?rgrav wrote: +> Robert Watson writes: +> > On Tue, 30 Mar 2004, Dag-Erling Sm?rgrav wrote: +> > > although the query only returns one row, it's a pretty big row, so 13 +> > > seconds could be explained by per-syscall or per-packet overhead. +> > Theory goes that there should be no per-read/write system call change = in +> > behavior for TCP with jail. Jail impacts bind/connect, and potentially +> > each I/O on UDP for an unbound socket using sendto. +>=20 +> root@outside /# /usr/bin/time -- sh -c 'echo "my sql query;" | mysql -co= mmand -line -arguments >/dev/null' +> 0.06 real 0.00 user 0.03 sys +> root@outside /# jexec 55 zsh +> root@inside /# /usr/bin/time -- sh -c 'echo "my sql query;" | mysql -com= mand -line -arguments >/dev/null' +> 13.65 real 0.01 user 0.04 sys +>=20 +> so it's definitely not CPU overhead - more likely a scheduling problem. Could you try chroot to / ? By doing: # jail / test `which zsh` # ? --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --GI1PA4Sghwo1XriW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAafLOForvXbEpPzQRAiZ9AKD2q8J/u3RmLjI7JkDxTCE2QZzhqwCgptXF D7std9sFCBCo/VOVVMk/7fc= =16Wn -----END PGP SIGNATURE----- --GI1PA4Sghwo1XriW--