[OpenIndiana-discuss] running VirtualBox headless

Edward Ned Harvey (openindiana) openindiana at nedharvey.com
Tue Jun 25 14:20:19 UTC 2013


> From: Jan Owoc [mailto:jsowoc at 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.


> 2) I was able to get the machine to autostart using SMF, but it was a
> lot of work; should I expand that section of the wiki with my
> findings? I have no idea how to get it to "autoshutdown" when the
> machine is shutting down.

There is a section on the wiki discussing SMF.  You should look at vboxsvc and simplesmf.  Jim writes and maintains vboxsvc, and I write and maintain simplesmf.



More information about the OpenIndiana-discuss mailing list