enhance: add per-type loading overhead upper bound for CachingLayer#71
Open
sparknack wants to merge 2 commits intozilliztech:masterfrom
Open
enhance: add per-type loading overhead upper bound for CachingLayer#71sparknack wants to merge 2 commits intozilliztech:masterfrom
sparknack wants to merge 2 commits intozilliztech:masterfrom
Conversation
e57a20f to
9b52531
Compare
thread_pool.cc uses openblas_set_num_threads under #ifdef OPENBLAS_OS_LINUX. Only search for openblas on non-Apple platforms; warn if not found instead of failing the build, since the ifdef guard ensures safe compilation without it. Signed-off-by: Shawn Wang <shawn.wang@zilliz.com>
Add LoadingOverheadTracker to cap the total DList loading resource
reservation for temporary loading overhead (e.g. preprocessing buffers)
per CellDataType. The tracker uses a delta-based model:
- Reserve() returns the incremental amount to reserve from DList
- Release() returns the incremental amount to release back to DList
- Total overhead reserved = min(sum_of_overhead, upper_bound)
This prevents over-reservation when many cells load concurrently,
since actual peak resource usage is bounded by pool_size * cell_size.
Changes:
- New LoadingOverheadTracker class with per-type state tracking
- Translator::estimated_byte_size_of_cell now returns {loaded, loading}
pair to separate final cache usage from temporary loading overhead
- CacheSlot::RunLoad integrates with tracker for reserve/release
- Manager passes tracker to CacheSlots and supports UB registration
- ~300 lines of unit tests for the tracker
Signed-off-by: Shawn Wang <shawn.wang@zilliz.com>
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.
Split cell resource estimation into loaded_resource (unconditional) and loading_overhead (capped by per-CellDataType upper bound) to prevent over-reservation when many concurrent loads happen. The real concurrent temporary resource usage is bounded by loading_pool_size * cell_size, so capping at that level avoids blocking other loads unnecessarily.