From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 11 07:12:21 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F2131065672 for ; Sun, 11 Jan 2009 07:12:21 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from fallbackmx09.syd.optusnet.com.au (fallbackmx09.syd.optusnet.com.au [211.29.132.242]) by mx1.freebsd.org (Postfix) with ESMTP id 9A4CF8FC18 for ; Sun, 11 Jan 2009 07:12:20 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail36.syd.optusnet.com.au (mail36.syd.optusnet.com.au [211.29.133.76]) by fallbackmx09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n0B4HLIV008151 for ; Sun, 11 Jan 2009 15:17:21 +1100 Received: from server.vk2pj.dyndns.org (c122-106-215-175.belrs3.nsw.optusnet.com.au [122.106.215.175]) by mail36.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n0B4HBXs002862 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Jan 2009 15:17:12 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id n0B4HAaK006274; Sun, 11 Jan 2009 15:17:10 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id n0B4HAqW006273; Sun, 11 Jan 2009 15:17:10 +1100 (EST) (envelope-from peter) Date: Sun, 11 Jan 2009 15:17:10 +1100 From: Peter Jeremy To: "M. Warner Losh" Message-ID: <20090111041710.GB5661@server.vk2pj.dyndns.org> References: <20090109.095027.-1672857892.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="neYutvxvOLaeuPCA" Content-Disposition: inline In-Reply-To: <20090109.095027.-1672857892.imp@bsdimp.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.18 (2008-05-17) Cc: hackers@freebsd.org Subject: Re: 3x read to write ratio on dump/restore 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: Sun, 11 Jan 2009 07:12:21 -0000 --neYutvxvOLaeuPCA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2009-Jan-09 09:50:27 -0700, "M. Warner Losh" wrote: >The read kBps was 3x the write kBps. =2E.. >Any ideas what gives? I observed this with 16MB cache and with 32MB >cache, fwiw. I've seen this as well. AFAIK, this is a side-effect of dump's caching. My top-of-head explanation is that each dump process has its own cache but actual I/O is round-robined on a (roughly) block scale so a large contiguous file will wind up in each 'slave' process's cache. The most obvious (and easiest) fixes are to either implement a shared cache (though this means another level of inter-process communication) or only use a single 'slave' process when caching is enabled. The cache algorithm could probably be enhanced as well - apart from inode blocks, any block will only be accessed once so once a block has been accessed, it can be purged from the cache (which is completely opposite to a "normal" cache). --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --neYutvxvOLaeuPCA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAklpcsYACgkQ/opHv/APuIf68wCgq8Tr6rXQur5nEVBgVn4gPSLl O1AAnjf2Nn3jqnii5ZHq9BycVa6hFXe8 =C38A -----END PGP SIGNATURE----- --neYutvxvOLaeuPCA--