On Tue, Jun 25, 2013 at 8:20 AM, Edward Ned Harvey (openindiana) <openindi...@nedharvey.com> wrote: >> From: Jan Owoc [mailto:jso...@gmail.com] >> >> 1) in the case of "synchronous=off", I had an order of magnitude speed >> increase for writes (i.e. during the install :-) ). Are there general >> guidelines for what kinds of workloads are "safe" to have the ZIL >> disabled? > > You mean "sync=disabled." ;-) > It goes like this: ZFS will aggregate writes into transactions, which will > then be atomically flushed to disk. So under no circumstance, does corrupt > data get written to disk, nor in the wrong temporal order. In the event of > an ungraceful system interruption (kernel panic, power outage, etc) the > on-disk data is always self-consistent, a snapshot of data that at some point > was valid. > > The risk is this: In order to aggregate those transactions, there's a period > of time (5sec) where data might be at risk because it exists solely in RAM > that has yet to be flushed to disk. As long as you can accept that risk, > then you are safe to run with sync=disabled. But it's not always easy to > determine if you can safely accept that risk. Read on: > > Generally, if your system is a standalone system, that doesn't have any > stateful clients watching it, then you're safe to disable sync. But for > example, if you have a bunch of NFS clients, and your ZFS server is a NFS > server... In the event your NFS server crashes and "rewinds" 5 sec, your NFS > clients will all remember what they were doing at the time of the crash, and > you'll have an inconsistent state between your server and clients. You can > remedy this situation by restarting all the NFS clients at the same time you > restart the NFS server. > > The point is: You need to first of all ask yourself if you can accept 5 sec > of potential data loss in the event of a crash, and you need to secondly ask > yourself, what services are being provided by the server, and if there is any > stateful client that will notice or care, if the server were to suddenly > crash and "rewind" as much as 5 sec.
Yes, I know it's shortened to "ZIL=disabled", but the actual setting I changed was "zfs set synchronous=off". :-) In my case, the virtual machine isn't offering any services - it's running some scripts that monitor stuff on the Internet, log it, and potentially act on it. I'll make sure the scripts I write are robust to the occasional rewinding of several seconds. Thanks for the insight. _______________________________________________ OpenIndiana-discuss mailing list OpenIndiana-discuss@openindiana.org http://openindiana.org/mailman/listinfo/openindiana-discuss