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

ref(project-cache): Schedule evictions #4241

Merged
merged 3 commits into from
Nov 12, 2024
Merged

Conversation

Dav1dde
Copy link
Member

@Dav1dde Dav1dde commented Nov 12, 2024

The hunt for tail latencies continues.

Project cache evictions for large project caches are quite costly, we're seeing a max latency for evictions of > 50ms. Timing the evictions of each project is not just much faster (log(n) inserts instead of full scans through projects), but also much shorter individually, giving the runtime opportunities to schedule other tasks.

Implementation is largely the same as in #4233, just backed by a PriorityQueue instead of a BinaryHeap, the future scheduling code is shared and not changed.

#skip-changelog

@Dav1dde Dav1dde requested a review from a team as a code owner November 12, 2024 10:55
@Dav1dde Dav1dde self-assigned this Nov 12, 2024
@Dav1dde Dav1dde force-pushed the dav1d/scheduled-evicitions branch 3 times, most recently from 1acab0c to cff5631 Compare November 12, 2024 11:02
@Dav1dde Dav1dde changed the title ref(project-cache): Schedule evicitions ref(project-cache): Schedule evictions Nov 12, 2024
@Dav1dde Dav1dde force-pushed the dav1d/scheduled-evicitions branch 2 times, most recently from c5156de to 16ed5b8 Compare November 12, 2024 11:15
@Dav1dde Dav1dde force-pushed the dav1d/scheduled-evicitions branch 2 times, most recently from 3d449f7 to 64a531c Compare November 12, 2024 12:14
@Dav1dde Dav1dde merged commit fab39cd into master Nov 12, 2024
22 of 23 checks passed
@Dav1dde Dav1dde deleted the dav1d/scheduled-evicitions branch November 12, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants