From owner-freebsd-questions@FreeBSD.ORG Fri May 22 09:32:11 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51261D9F for ; Fri, 22 May 2015 09:32:11 +0000 (UTC) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 115DD195E for ; Fri, 22 May 2015 09:32:10 +0000 (UTC) Received: from r56.edvax.de (port-92-195-181-19.dynamic.qsc.de [92.195.181.19]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id F07743CEAB; Fri, 22 May 2015 11:32:01 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id t4M9W1IQ006858; Fri, 22 May 2015 11:32:01 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Fri, 22 May 2015 11:32:00 +0200 From: Polytropon To: galtsev@kicp.uchicago.edu Cc: freebsd-questions Subject: Re: SLOG and SSDs: are "super" capacitors really needed? Message-Id: <20150522113200.9be131b8.freebsd@edvax.de> In-Reply-To: <48018.128.135.70.2.1432225912.squirrel@cosmo.uchicago.edu> References: <48018.128.135.70.2.1432225912.squirrel@cosmo.uchicago.edu> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 09:32:11 -0000 On Thu, 21 May 2015 11:31:52 -0500 (CDT), Valeri Galtsev wrote: > To re-phrase that (I'm just stealing somebody's else phrase...): all > devices (that have RAM cache) lie about "transaction complete". They > report it NOT when the transaction is safely dumped from volatile cache > into non-volatile storage, but just as soon as the device accepted all > data (most of which may be in volatile memory). This makes their specs > look good compared to competition. And which technically is bad. As I for > one would prefer "transaction complete" (or similar) only when all data > are already safely stored in non-volatile part of the storage device. But > the life is bad - there is no way of knowing it (as far as I know) ;-( This is correct. There are many layers involved which all will comsume some time to "do something" and then report back about the result, like starting from fflush() to the VFS layer, then through the "ada" disk driver, the interface controller, to the drive's internal firmware. (In fact, there are many more layers than those few!) Just because the firmware then says "Done writing!" it doesn't make you 100% certain that the data has actually arrived in the non-volatile memory of the disk (or SSD, for that matter), as this also takes time and may happen _after_ the firmware has reported success. Giving the drive "some time" is always a good idea. > PS Make use of UPSes! This will give you the required time in worst case, hopefully. Still a minimal chance for getting corrupted data... -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...