Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

safekeeper: optimize control file fsyncs on commit_lsn advancement #9663

Closed
Tracked by #9624
erikgrinaker opened this issue Nov 6, 2024 · 0 comments · Fixed by #9698
Closed
Tracked by #9624

safekeeper: optimize control file fsyncs on commit_lsn advancement #9663

erikgrinaker opened this issue Nov 6, 2024 · 0 comments · Fixed by #9698
Assignees
Labels
a/performance Area: relates to performance of the system c/storage/safekeeper Component: storage: safekeeper

Comments

@erikgrinaker
Copy link
Contributor

erikgrinaker commented Nov 6, 2024

We flush the control file every time the commit_lsn crosses a segment boundary (3 fsyncs). However, segments are only 16 MB, so this will happen 64 times per second if we want to hit 1 GB/s.

Note, however, that a safekeeper will not allow commit_lsn to advance past its local flush_lsn. So by reducing the number of flushes will also reduce the number of commit_lsn control flushes.

We should try to optimize this. Might be as simple as just flushing it more rarely, and taking it off the ingest hot path (e.g. separate thread). We could also consider increasing the segment size (see #9687).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/performance Area: relates to performance of the system c/storage/safekeeper Component: storage: safekeeper
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant