Date: Thu, 12 May 2011 02:05:24 -0700 From: Jeremy Chadwick <freebsd@jdc.parodius.com> To: ?imun Mikecin <numisemis@gmail.com> Cc: freebsd-fs <freebsd-fs@freebsd.org> Subject: Re: ZFS: How to enable cache and logs. Message-ID: <20110512090524.GA2106@icarus.home.lan> In-Reply-To: <A3B76BB6-49DC-4C2F-BD2B-9A0C62F4D24C@gmail.com> References: <4DCA5620.1030203@dannysplace.net> <4DCB455C.4020805@dannysplace.net> <alpine.GSO.2.01.1105112146500.20825@freddy.simplesystems.org> <20110512033626.GA52047@icarus.home.lan> <4DCB7F22.4060008@digsys.bg> <20110512083429.GA58841@icarus.home.lan> <A3B76BB6-49DC-4C2F-BD2B-9A0C62F4D24C@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 12, 2011 at 10:45:01AM +0200, ?imun Mikecin wrote: > On 12. svi. 2011., at 10:34, Jeremy Chadwick wrote: > > > > I had no idea the primary point of a SLOG was to deal with applications > > that make use of O_SYNC. I thought it was supposed to improve write > > performance for both asynchronous and synchronous writes. Obviously I'm > > wrong here. > > If the application is not using O_SYNC, write operation returns to the > app before the data is actually written. Yes, I understand that -- O_SYNC is effectively the same as issuing fsync(2) after every write(2) call. I just thought that the ZIL improved both synchronous and asynchronous writes, but my understanding of the ZIL is obviously very limited. > > What guarantee is there that the intent log -- which is written to the > > disk -- actually got written to the disk in the middle of a power > > failure? There's a lot of focus there on the idea that "the intent log > > will fix everything, but may lose writes", but what guarantee do I have > > that the intent log isn't corrupt or botched during a power failure? > > I expect that checksumming also works for ZIL (anybody knows?). If > that is the case, corruption would be detected, but you will have lost > data unless you are using mirrored slog devices. I can't believe that statement either (the last line). I guess that's also what I'm asking here -- what guarantee do you have that even with a mirrored 2-disk SLOG (or heck, 3 or 4!) that *no data* will be *lost* during a power outage? It seems to me the proper phrase would be "the likelihood of losing an entire pool during a power outage is lessened". Alexander indirectly hinted at this in another post of his tonight, specifically regarding zpool v15 versus v28: "The difference between v15 and v28 is the amount of data you lose (the entire pool vs. only what is still on the log devices)". This makes much more sense to me. It seems that in a power outage, there will always be some form of data loss. I imagine even systems that have hardware RAM/cache with BBUs on everything; there's always some form of caching going on *somewhere* within a system, from CPU all the way up, that guarantees some degree of data loss). I guess I'm OCD'ing over the terminology here. Sorry. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP 4BD6C0CB |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110512090524.GA2106>