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

feat(storage): switch to eviction time disk cache insertion #20076

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MrCroxx
Copy link
Contributor

@MrCroxx MrCroxx commented Jan 9, 2025

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Motivation: Previously, foyer does a double-write on both in-memory cache and disk cache on insertion. The total cache volume is max(mem, disk), which is inefficient on large memory setups.

This PR replace the double-write on insertion with eviction-time disk cache insertion. The total cache volume is mem + disk.

Related foyer side PR: foyer-rs/foyer#830

Checklist

  • I have written necessary rustdoc comments.
  • I have added necessary unit tests and integration tests.
  • I have added test labels as necessary.
  • I have added fuzzing tests or opened an issue to track them.
  • My PR contains breaking changes.
  • My PR changes performance-critical code, so I will run (micro) benchmarks and present the results.
  • My PR contains critical fixes that are necessary to be merged into the latest release.

Documentation

  • My PR needs documentation updates.
Release note

@MrCroxx MrCroxx self-assigned this Jan 9, 2025
@MrCroxx MrCroxx requested a review from a team as a code owner January 9, 2025 04:20
@MrCroxx MrCroxx requested a review from xxchan January 9, 2025 04:20
@MrCroxx
Copy link
Contributor Author

MrCroxx commented Jan 10, 2025

Benchmark with 10 Gib (small) disk cache vs baseline (without this PR).

image

(Seems something wrong with the baseline, but doesn't affect the conclusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant