From owner-freebsd-fs@FreeBSD.ORG Sun Oct 16 18:52:12 2011 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 B4A0B106564A for ; Sun, 16 Oct 2011 18:52:12 +0000 (UTC) (envelope-from luchesar.iliev@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3D69F8FC12 for ; Sun, 16 Oct 2011 18:52:12 +0000 (UTC) Received: by bkbzu17 with SMTP id zu17so2903311bkb.13 for ; Sun, 16 Oct 2011 11:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:disposition-notification-to:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding; bh=oksDqTP2HOnK8TrZNOj4iOET6qRsNAodX4TQu7I90Mo=; b=gJqexuC3douGb8aICmV4arg0YYE7DPiwV26mMD9rosCscMZOCF6WLtknXkq9gkhhcA QYyAfm7d7XXXb6kTHfTgoUme2ehY5ZW852t3jgYPHvHlcgEqWwHHRRNIUpe8oxS2Aa+V rOaBiFy38N4z9N27z8jjwrkA/mA5gTuCufbwk= Received: by 10.223.77.26 with SMTP id e26mr9791168fak.37.1318791131198; Sun, 16 Oct 2011 11:52:11 -0700 (PDT) Received: from [79.124.93.41] ([79.124.93.41]) by mx.google.com with ESMTPS id f23sm4616464faf.0.2011.10.16.11.52.09 (version=SSLv3 cipher=OTHER); Sun, 16 Oct 2011 11:52:10 -0700 (PDT) Message-ID: <4E9B27D8.70106@gmail.com> Date: Sun, 16 Oct 2011 21:52:08 +0300 From: "Luchesar V. ILIEV" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111002 Thunderbird/7.0.1 MIME-Version: 1.0 To: Jeremy Chadwick References: <4E9AE725.4040001@gmail.com> <169E82FD-3B61-4CAB-B067-D380D69CDED5@digsys.bg> <4E9B1C1E.7090804@gmail.com> <20111016183003.GA29466@icarus.home.lan> In-Reply-To: <20111016183003.GA29466@icarus.home.lan> X-Enigmail-Version: undefined OpenPGP: id=9A1FEEFF; url=https://cert.acad.bg/pgp-keys/ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: [ZFS] Using SSD with partitions 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: Sun, 16 Oct 2011 18:52:12 -0000 On 16/10/2011 21:30, Jeremy Chadwick wrote: > On Sun, Oct 16, 2011 at 09:02:06PM +0300, Luchesar V. ILIEV wrote: >> On 16/10/2011 19:17, Daniel Kalchev wrote: >>> >>> On Oct 16, 2011, at 17:16 , Luchesar V. ILIEV wrote: >>> >>>> 6. If, OTOH, you're running a reasonably recent -STABLE (8 or 9), >>>> then your zpool version is likely 28 (thanks, pjd@), which means >>>> ZIL is not that scary, but you might still lose some data. Even an >>>> unexpected power failure might cause trouble, unless the SSD is >>>> designed to handle it gracefully (this typically involves some sort >>>> of capacitor). >>> >>> Just for the record: even without ZIL, you will most definitely lose >>> data at power outage. In most cases, this will not damage the ZFS >>> filesystem, but data will be lost. There is nothing that can prevent >>> this. >>> >>> Therefore, with ZFS v28, adding ZIL does not introduce any more risk >>> to your data. >> >> I might be wrong in my interpretation, but from what I remember, when >> the power goes down, an unprotected SSD is likely to lose _more_ data >> than simply its write buffers -- that's quite unlike a hard-drive. So >> much, in fact, that the whole ZIL might become corrupted (and that's >> potentially way more data than any device cache). >> >> _If_ that's true, then isn't an array of only "conventional" HDDs, where >> the ZIL is interleaved with the zpool itself, at least a bit safer from >> power failures? Again, if we are taking the cheaper SSDs into account. > > Please expand on the above, providing reference materials or links to > things you've read that help shed light on all of this. More > specifically: I haven't really dug that much into that. Apart from general comments (mostly on the OpenSolaris forums), the most technical (and academic) source of information is the paper that I already quoted: Hung-Wei Tseng, Laura M. Grupp, Steven Swanson, "Understanding the Impact of Power Loss on Flash Memory", DCSE-UCSD. http://cseweb.ucsd.edu/users/swanson/papers/DAC2011PowerCut.pdf > 1) I would like a definition of what "unprotected SSD" means and what a > "protected SSD" is. Let me better quote again, "Many high-end SSDs have backup batteries or capacitors to ensure that operations complete even if power fails. Our results argue that these systems should provide power until the chip signals that the operation is finished rather than until the data appears to be correct. Low-end SSDs and embedded systems, however, often do not contain backup power sources due to cost or space constraints, and these systems must be extremely careful to prevent data loss and/or reduced reliability after a power failure." > 2) I would like an explanation as to what "SSDs are more likely than an > MHDD to lose data on a power outage" means exactly (on a technical > level, not something vague) and from where you got this interpretation. Again, to quote "The flash memory devices we studied in this work demonstrated unexpected behavior when power failure occurs. The error rates do not always decrease as the operation proceeds, and power failure can corrupt the data from operations that completed successfully. We also found that relying on blocks that have been programmed or erased during a power failure is unreliable, even if the data appears to be intact." I'd actually be interested to hear what the more experienced folks here think about this; however, again, it's probably not right to hijack the current thread. Cheers, Luchesar