You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the database compaction works, writing data to the "temp don't use" file, the updates are written in "sync" mode. For my HDD based ZFS system, this slows down operation quite a lot (it's not worth it to add a SLOG VDEV, as only lnd is using "sync"). Manually disabling "sync" on the filesystem (which one should not do in general!) massively improves the speed of the compaction process.
I believe it's not necessary to sync during compaction, as the data is only used once the whole process completes (running sync at the end might be necessary, though).
C-Otto
changed the title
[bug]: useless file system "sync" for boltdb compaction
[feature]: remove useless file system "sync" for boltdb compaction
Feb 25, 2024
Background
While the database compaction works, writing data to the "temp don't use" file, the updates are written in "sync" mode. For my HDD based ZFS system, this slows down operation quite a lot (it's not worth it to add a SLOG VDEV, as only lnd is using "sync"). Manually disabling "sync" on the filesystem (which one should not do in general!) massively improves the speed of the compaction process.
I believe it's not necessary to sync during compaction, as the data is only used once the whole process completes (running sync at the end might be necessary, though).
Your environment
Steps to reproduce
Run bbolt compaction on, for example, the
watchtower.db
file of a watchtower (server).Expected behaviour
It's fast.
Actual behaviour
It's slow.
The text was updated successfully, but these errors were encountered: