Configuring Durability

written by vdbdev on August 29, 2013 with no comments

VoltDB achieves on-disk durability via its command logging feature. Command logging is enabled via the deployment.xml file. Command logging can not be enabled/disabled on a running cluster.

<deployment>
    <cluster hostcount="4" sitesperhost="2" kfactor="1" />
    <commandlog enabled="true"/>
</deployment>

Command logging has several configurable properties, including the path to the directory that log files will be written to, synchronous vs. asynchronous logging, as well as some performance tuning parameters. These are detailed in the Configuring Command Logging for Optimal Performance chapter of Using VoltDB. A deployment file showing all command logging options is included below for reference.

<deployment>
    <cluster hostcount="4" sitesperhost="2" kfactor="1" />
    <commandlog enabled="true" logsize="2048" synchronous="true">
        <frequency time="500" transactions="10000"/>
    </commandlog> 
    <paths>
        <commandlog path="/disk1/cmdlog"/>
        <commandlogsnapshot path="/disk2/cmdlog_snapshot"/>
    </paths> 
</deployment> 
  • commandlog[logsize]: logsize in MB that triggers snapshot for log truncation
  • commandlog[synchronous]: require an fsync at each partition before responding to client
  • commandlog/frequency: fsync the minimum of time ms or transactions transactions.
  • paths/commandlogpath[path]: directory to write command logs
  • paths/commandlogsnapshot[path]: directory write truncation snapshots

More Information

Command logging is described in depth in the ~Using VoltDB~ guide. Please see the Command Logging and Recovery chapter for further help.

~