Batch multiple WAL fsyncs
Batch multiple WAL fsyncs

Every write to the WAL current runs and fsync before returning.  When
there are lot of concurrent writes, this can cause the WAL to bottleneck
write throughput since fsyncs are very expensive.

This changes the writeToLog to fsync on an interval to allow multiple fsyncs
calls to be batched up into one.  The writeToLog behavior is the same in that
it won't return until an fsync has been performed.

nooproblem/influxdb,li-ang/influxdb,linearb/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,influxdata/influxdb,influxdb/influxdb,influxdb/influxdb,benbjohnson/influxdb,vladlopes/influxdb,runner-mei/influxdb,mark-rushakoff/influxdb,jgeiger/influxdb,influxdb/influxdb,pkittenis/influxdb,runner-mei/influxdb,archsaber/influxdb,runner-mei/influxdb,mark-rushakoff/influxdb,linearb/influxdb,li-ang/influxdb,archsaber/influxdb,benbjohnson/influxdb,jgeiger/influxdb,runner-mei/influxdb,pkittenis/influxdb,benbjohnson/influxdb,chenziliang/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,linearb/influxdb,linearb/influxdb,chenziliang/influxdb,benbjohnson/influxdb,chenziliang/influxdb,jgeiger/influxdb,jgeiger/influxdb,jgeiger/influxdb,pkittenis/influxdb,pkittenis/influxdb,influxdb/influxdb,linearb/influxdb,chenziliang/influxdb,mark-rushakoff/influxdb,influxdata/influxdb,vladlopes/influxdb,nooproblem/influxdb,nooproblem/influxdb,nooproblem/influxdb,jgeiger/influxdb,vladlopes/influxdb,nooproblem/influxdb,influxdb/influxdb,vladlopes/influxdb,archsaber/influxdb,pkittenis/influxdb,pkittenis/influxdb,archsaber/influxdb