From owner-freebsd-fs@FreeBSD.ORG Wed Aug 15 06:46: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 7B022106566B for ; Wed, 15 Aug 2012 06:46:52 +0000 (UTC) (envelope-from Karli.Sjoberg@slu.se) Received: from Exchange2.ad.slu.se (exchange2.ad.slu.se [193.10.100.95]) by mx1.freebsd.org (Postfix) with ESMTP id D0A158FC17 for ; Wed, 15 Aug 2012 06:46:51 +0000 (UTC) Received: from exmbx3.ad.slu.se ([193.10.100.93]) by Exchange2.ad.slu.se ([193.10.100.95]) with mapi; Wed, 15 Aug 2012 08:45:39 +0200 From: =?iso-8859-1?Q?Karli_Sj=F6berg?= To: Freddie Cash Date: Wed, 15 Aug 2012 08:45:38 +0200 Thread-Topic: Hang when importing pool Thread-Index: Ac16sZUmk6OCFGzITvieVYOmToJ0Bg== Message-ID: <49C9D08A-85EF-4D23-B07F-F3980CBA5A97@slu.se> References: In-Reply-To: Accept-Language: sv-SE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: sv-SE, en-US MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "freebsd-fs@freebsd.org" Subject: Re: Hang when importing pool X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2012 06:46:52 -0000 31 jul 2012 kl. 17.31 skrev Freddie Cash: On Mon, Jul 30, 2012 at 11:31 PM, Karli Sj=F6berg > wrote: I=B4m really struggling with this. I have had a pool with imported filesyst= ems from a Solaris system that had dedup activated. Then, when the time cam= e to erase them, it just stalled. When rebooting, it stalled again at mount= ing filesystems, and since then, I=B4ve installed two USB drives to act as = root pool with FreeBSD-9.0-RELEASE so that I could import the original pool= in recovery, but it always stalls after a couple of hours. Looking at top,= I could see that the 16GB RAM was maxed out, so I have heavily tuned down = kmem, arc, etc: You're running out of RAM during the import, as it loads the DDT. Stuff a bunch more RAM into the machine (32 GB, 48 GB, even 64 GB). Then you will be able to load the full DDT into RAM, finish the aborted destroy process, and import the pool. We've run into this three or four times now on systems with dedupe enabled and only 16 GB of RAM. We've since upgraded all our boxes to a minimum of 32 GB, with one having 64 GB. ZFS dataset destruction with dedupe enabled takes *a lot* of time and RAM, as the DDT needs to be updated for every block freed. And rebooting in the middle of a "zfs destroy" operation means that the operation needs to finish at pool import time. -- Freddie Cash fjwcash@gmail.com I took your advice. I replaced my Core i5 with a Xeon X3470 and ramped up t= he RAM to 32GB, maxing out the HW. Sadly enough, it still stalls in the exa= ct same manner:( This has to be the most frustrating thing ever, since ther= e=B4s tons of data there that I really need and if it wasn=B4t for that stu= pid destroy operation, it would still be accessible. I feel that FreeBSD is partly to blame since it was completely possible in = the originating SUN machine with Solaris that only has 16GB RAM to do the s= ame destroy to the same dataset without any problem. Sure, it took forever = and then some (about two weeks) but it stayed afloat during the whole time. The FreeBSD machine starts to accumulate more and more RAM, but quite stead= ily until it comes up to 9-9.5GB of RAM Wired and then it just SHOOTS off t= o swallow it all and cause a stall. That is the same behavior as when there= was only 16GB RAM. During the last attempt I had while true; do zfs-stats -A | grep "ARC Size:" zfs-stats -L | egrep '(L2 ARC Size|Bytes Scanned)' sleep 10 done running, so I could monitor the usage just before the crash. The ARC stayed= at 6GB, while the last top sample shows 28GB Wired. See for yourselves: top: http://i45.tinypic.com/21do5ra.png gstat: http://i49.tinypic.com/e197ax.png zfs-stats: http://i46.tinypic.com/250uxhz.png Import CTRL+T after it stalled: http://i46.tinypic.com/2uxvb4h.png I=B4m willing to try anything at this point. Any longshots you have are mos= t welcome, since it couldn=B4t get any worse:( Med V=E4nliga H=E4lsningar ---------------------------------------------------------------------------= ---- Karli Sj=F6berg Swedish University of Agricultural Sciences Box 7079 (Visiting Address Kron=E5sv=E4gen 8) S-750 07 Uppsala, Sweden Phone: +46-(0)18-67 15 66 karli.sjoberg@slu.se