Conversation
When creating or compressing a snapshot, `fsync` all files and directories, so as to ensure that the snapshot is durable on the local disk. This obviously amounts to a large number of `fsync` calls, which may negatively impact performance of taking a snapshot -- since we hold a transaction lock while taking a snapshot, this is not to be taken lightly.
|
Is it necessary for replication to |
Yeah, could try that. |
gefjon
left a comment
There was a problem hiding this comment.
Looks good. If you'd like to try the version that fsyncs after releasing the lock, it might be worth trying, but if you just wanna merge this version, that's fine by me.
|
I've changed this to defer syncing until after the datastore lock is released. Let me know what you think @gefjon |
gefjon
left a comment
There was a problem hiding this comment.
Thanks for doing that. The code is slightly more complicated, but we can now be much more confident this won't negatively affect performance.
When creating or compressing a snapshot,
fsyncall files and directories, so as to ensure that the snapshot is durable on the local disk.This obviously amounts to a large number of
fsynccalls, which may negatively impact performance of taking a snapshot -- since we hold a transaction lock while taking a snapshot, this is not to be taken lightly.Expected complexity level and risk
3 -- performance impact
Testing
I haven't quantified the performance impact.