From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 20 16:09:17 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7AA5D16A475 for ; Wed, 20 Jun 2007 16:09:17 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 64B2313C484 for ; Wed, 20 Jun 2007 16:09:17 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from rot26.obsecurity.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 5A56F1A3C19; Wed, 20 Jun 2007 09:08:23 -0700 (PDT) Received: by rot26.obsecurity.org (Postfix, from userid 1001) id C7426BAA1; Wed, 20 Jun 2007 12:09:16 -0400 (EDT) Date: Wed, 20 Jun 2007 12:09:16 -0400 From: Kris Kennaway To: David Cross Message-ID: <20070620160916.GA26574@rot26.obsecurity.org> References: <20070620100737.S56928@max.okcupid.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="n8g4imXOkfNTN/H1" Content-Disposition: inline In-Reply-To: <20070620100737.S56928@max.okcupid.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: Very slow sed... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2007 16:09:17 -0000 --n8g4imXOkfNTN/H1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 20, 2007 at 10:24:01AM -0400, David Cross wrote: > Machine 2: > time sed -f=20 > /usr/src/gnu/usr.bin/groff/tmac/../../../../contrib/groff/tmac/strip.sed= =20 > /usr/src/gnu/usr.bin/groff/tmac/../../../../contrib/groff/tmac/doc-common= =20 > >/dev/null >=20 > real 0m4.506s > user 0m4.167s > sys 0m0.000s >=20 > Yes... you read that right... almost 400 _TIMES_ slower. WTF.. >=20 > Where should I be looking? Try ktracing to see what it is doing (although sys time =3D 0 says it's all in userland). So maybe gprof or pmc. Also double check the kernel configs are identical and malloc debugging is disabled. Kris --n8g4imXOkfNTN/H1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (FreeBSD) iD8DBQFGeVEsWry0BWjoQKURAm/OAJ9vKSiovbuut+3iEWttz7maJSSAlQCg9kv2 a+/nvwgDUN61CQtZ9MPu9Sk= =miy5 -----END PGP SIGNATURE----- --n8g4imXOkfNTN/H1--