Repository navigation
IO resource usage permit - #6015
Merged
Merged
Conversation
generall
force-pushed
the
io-usage-permit
branch
from
February 18, 2025 19:17
a98195c to
9656b26
Compare
generall
marked this pull request as ready for review
February 18, 2025 23:54
generall
commented
Feb 19, 2025
Comment on lines
+459
to
+493
| // 000 - acquired | ||
| // +++ - blocked on waiting | ||
| // | ||
| // Case: 1 indexation job at a time, long indexing | ||
| // | ||
| // IO limit = 1 | ||
| // CPU limit = 2 Next optimization | ||
| // │ loop | ||
| // │ | ||
| // ▼ | ||
| // IO 0 00000000000000 000000000 | ||
| // CPU 1 00000000000000000 | ||
| // 2 00000000000000000 | ||
| // | ||
| // | ||
| // IO 0 ++++++++++++++00000000000000000 | ||
| // CPU 1 ++++++++0000000000 | ||
| // 2 ++++++++0000000000 | ||
| // | ||
| // | ||
| // Case: 1 indexing j0b at a time, short indexation | ||
| // | ||
| // | ||
| // IO limit = 1 | ||
| // CPU limit = 2 | ||
| // | ||
| // | ||
| // IO 0 000000000000 ++++++++0000000000 | ||
| // CPU 1 00000 | ||
| // 2 00000 | ||
| // | ||
| // IO 0 ++++++++++++00000000000 +++++++ | ||
| // CPU 1 00000 | ||
| // 2 00000 | ||
| // At this stage workload shifts from IO to CPU, so we can release IO permit |
Member
Author
There was a problem hiding this comment.
Most important part is here
timvisee
reviewed
Feb 19, 2025
timvisee
left a comment
Member
There was a problem hiding this comment.
Reviewed in call.
We found two points of improvement:
- Use the same count in IO budget, and acquire the same amount of IO vs CPU. That keeps both in sync.
replace_withcan deadlock when re-acquiring the same resource
timvisee
approved these changes
Feb 19, 2025
Member
|
Are there some benchmark results to share to validate this patch? |
Member
Author
|
Not yet. I wanted to make them before merging |
Member
|
Sorry! 🤡 |
Member
Author
timvisee
added a commit
that referenced
this pull request
Mar 21, 2025
* rename cpu_budget -> resource_budget * clippy * add io budget to resources * fmt * move budget structures into a separate file * add extend permit function * dont extend existing permit * switch from IO to CPU permit * do not release resource before aquiring an extension * fmt * Review remarks * Improve resource permit number assertion * Make resource permit replace_with only acquire extra needed permits * Remove obsolete drop implementation * allocate IO budget same as CPU * review fixes --------- Co-authored-by: timvisee <[email protected]>
Merged
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Optimization is running in multiple stages. One stage is IO-heavy, another is CPU-heavy.
We want to utilize all types of resources at the same time, so we introduce a new type of resource budget, that allows other parallel processes to pick up IO-heavy phase without awaiting for CPU-heavy one