boltdb/bolt — pull request #225 by benbjohnson (2014-07-15 13:41:11+00:00)
Title: Add DB.NoSync option for bulk loading.

This commit adds the `DB.NoSync` flag to skip `fsync()` calls on each commit. This should only be used for bulk loading as it can corrupt your database in the event of a system failure.

Initial tests show it can provide a 2x speed up for sequential inserts:

```sh
$ bolt bench --count 1000000 --batch-size 1000
# Write	3.767138221s	(3.767us/op)	(265463 op/sec)
```

```sh
$ bolt bench --count 1000000 --batch-size 1000 --no-sync
# Write	2.081039319s	(2.081us/op)	(480538 op/sec)
```

/cc @snormore @mkobetic