safekeeper: optimize control file fsyncs on commit_lsn advancement #9663
Labels
a/performance
Area: relates to performance of the system
c/storage/safekeeper
Component: storage: safekeeper
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).
The text was updated successfully, but these errors were encountered: