From owner-freebsd-performance@FreeBSD.ORG Tue Jan 3 08:46:59 2012 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 661CA1065670 for ; Tue, 3 Jan 2012 08:46:59 +0000 (UTC) (envelope-from marcolz@zlo.nu) Received: from mzh.zlo.nu (ns0.zlo.nu [85.17.141.90]) by mx1.freebsd.org (Postfix) with ESMTP id 1F8AC8FC1B for ; Tue, 3 Jan 2012 08:46:58 +0000 (UTC) Received: by mzh.zlo.nu (Postfix, from userid 1000) id 89BBF140C5; Tue, 3 Jan 2012 09:34:54 +0100 (CET) Date: Tue, 3 Jan 2012 09:34:54 +0100 From: Marc Olzheim To: Garrett Cooper Message-ID: <20120103083454.GA22673@zlo.nu> References: <20120103073736.218240@gmx.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-performance@freebsd.org, Dieter BSD Subject: Re: cmp(1) has a bottleneck, but where? X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2012 08:46:59 -0000 --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 03, 2012 at 12:21:10AM -0800, Garrett Cooper wrote: > The file is 3.0GB in size. Look at all those page faults though! > Thanks! > -Garrett =46rom usr.bin/cmp/c_regular.c: #define MMAP_CHUNK (8*1024*1024) =2E.. for (..) { mmap() chunk of size MMAP_CHUNK. compare munmap()k } That 8 MB chunk size sounds like a bad plan to me. I can imagine something needed to be done to compare files larger than X GB on a 32bit system, but 8MB is pretty small... Marc --/04w6evG8XlLl3ft Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk8Cva4ACgkQezjnobFOgrGrbwCfdhbKDodxrvUN2TZhpPbbUnhE 6vEAoMVxRX6Fn8rtoqDGwZ9Iaz8Sf/kV =rOJW -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft--