From owner-freebsd-fs@FreeBSD.ORG Fri Jul 13 16:29:52 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49A5D106564A for ; Fri, 13 Jul 2012 16:29:52 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay05.ispgateway.de (smtprelay05.ispgateway.de [80.67.31.93]) by mx1.freebsd.org (Postfix) with ESMTP id 0355A8FC0A for ; Fri, 13 Jul 2012 16:29:52 +0000 (UTC) Received: from [78.35.148.244] (helo=fabiankeil.de) by smtprelay05.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1Spik8-0000eU-FI; Fri, 13 Jul 2012 18:29:24 +0200 Date: Fri, 13 Jul 2012 18:29:21 +0200 From: Fabian Keil To: Dennis Glatting Message-ID: <20120713182921.55f16f4b@fabiankeil.de> In-Reply-To: <1342193136.60708.16.camel@btw.pki2.com> References: <1341864787.32803.43.camel@btw.pki2.com> <20120712151541.7f3a6886@fabiankeil.de> <20120713170632.065e650e@fabiankeil.de> <1342193136.60708.16.camel@btw.pki2.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/L2e1Nz7tdWoh8hCToPk=v.x"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 Cc: freebsd-fs@freebsd.org Subject: Re: ZFS hanging X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-fs@freebsd.org List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 16:29:52 -0000 --Sig_/L2e1Nz7tdWoh8hCToPk=v.x Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Dennis Glatting wrote: > On Fri, 2012-07-13 at 17:06 +0200, Fabian Keil wrote: > > Lytochkin Boris wrote: > >=20 > > > On Thu, Jul 12, 2012 at 5:15 PM, Fabian Keil > > > wrote: > > > > fk@r500 ~ $zpool status > > > > load: 0.15 cmd: zpool 2698 [spa_namespace_lock] 543.23r 0.00u 0.12= s 0% 2908k > > >=20 > > > This sounds familiar with http://www.freebsd.org/cgi/query-pr.cgi?pr= =3D163770 > > > Try playing with kern.maxvnodes. > >=20 > > Thanks for the suggestion, but the system is my laptop and I already > > set kern.maxvnodes=3D400000 which I suspect is more than I'll ever need. > >=20 > > Currently I uses less than a tenth of this, but I'll keep an eye on > > it the next time the issue occurs. > >=20 > > I usually reach this deadlock after losing the vdev in a single-vdev po= ol. > > My suspicion is that the deadlock is caused by some kind of "failure to > > communicate" between ZFS and the various geom layers involved. > >=20 > > I already know that losing vdevs with the pool configuration I use > > can cause http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/162010 > > and http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/162036 and I > > suspect that the deadlock is just another symptom of the same issue. Just to be clear: I meant the spa_namespace_lock deadlock on my system, not the one that started this thread. > What is the math and constraints behind kern.maxvnodes and how would a > reasonable value be chosen? The kernel already chooses a reasonable value for you and usually there's no reason to overwrite it. You can find the kernel's math at http://fxr.watson.org/fxr/source/kern/vfs_subr.c#L284 (ff). > On some of my systems (default): >=20 >=20 > iirc# sysctl -a | grep kern.maxvnodes > kern.maxvnodes: 1097048 You can compare this with vfs.numvnodes and vfs.freevnodes if you like (which of course depend on the load), but so far I don't remember seeing any indication that your problem has anything to do with maxvnodes (or block sizes for that matter). Fabian --Sig_/L2e1Nz7tdWoh8hCToPk=v.x Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlAATOMACgkQBYqIVf93VJ1quQCbB5ly7VH4deOwZ32Tg6KsxP0i qrQAn0F0NfKxWEPF9HseLXJbacBuW/vO =L2xq -----END PGP SIGNATURE----- --Sig_/L2e1Nz7tdWoh8hCToPk=v.x--