Repository navigation
perf(compaction): drop compaction I/O from page cache via FADV_DONTNEED - #215
Conversation
Greptile SummaryThe PR reduces compaction page-cache pollution on Linux by advising the kernel to discard one-pass input pages and synced output ranges, while retaining no-op behavior on other platforms. It also syncs recompaction output before publishing its metadata.
Confidence Score: 5/5The PR appears safe to merge, with cache eviction ordered after durable output synchronization and no concrete correctness or security defect identified. The changed compaction paths preserve metadata and segment ordering, use stable segment identities for range tracking, and treat cache advice as a guarded best-effort optimization. Important Files Changed
Reviews (1): Last reviewed commit: "perf(compaction): drop compaction I/O fr..." | Re-trigger Greptile |
Compaction reads one-pass raw-file/segment inputs and writes segment outputs through the page cache, evicting warm serving data. Track written output ranges per segment and drop them (plus one-pass input pages) with posix_fadvise(FADV_DONTNEED) only after the segment is synced; no-op on non-Linux. Also adds the missing newSeg.Sync() before recompaction metadata publish. Candidate cand_g41znje23g from perfloop case_61m5ctxv01, validated locally (memory-limited Linux containers, mincore-based residency). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01L5DLvDTo9dhD38YQXhHpU9 Signed-off-by: Ovais Tariq <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01L5DLvDTo9dhD38YQXhHpU9 Signed-off-by: Ovais Tariq <[email protected]>
18798d0 to
3a4eb21
Compare
|
🎉 This PR is included in version 1.10.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Compaction reads one-pass raw-file/segment inputs and writes segment outputs through the page cache, evicting warm serving data. Track written output ranges per segment and drop them (plus one-pass input pages) with posix_fadvise(FADV_DONTNEED) only after the segment is synced; no-op on non-Linux. Also adds the missing newSeg.Sync() before recompaction metadata publish.
Candidate cand_g41znje23g from perfloop case_61m5ctxv01, validated locally (memory-limited Linux containers, mincore-based residency).
Note
Cursor Bugbot is generating a summary for commit 97c8ebf. Configure here.