-
Notifications
You must be signed in to change notification settings - Fork 157
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: Cache gpu_alloc_map
in Redis, and Add RescanGPUAllocMaps
mutation
#3293
Open
jopemachine
wants to merge
24
commits into
topic/06-13-feat_support_scanning_gpu_allocation
Choose a base branch
from
topic/12-24-feat_cache_gpu_alloc_map_and_add_scangpuallocmap_mutation
base: topic/06-13-feat_support_scanning_gpu_allocation
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+330
−4
Conversation
This file contains 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
github-actions
bot
added
area:docs
Documentations
comp:manager
Related to Manager component
labels
Dec 24, 2024
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
jopemachine
force-pushed
the
topic/06-13-feat_support_scanning_gpu_allocation
branch
from
December 24, 2024 02:35
f3056c8
to
0c45322
Compare
jopemachine
force-pushed
the
topic/12-24-feat_cache_gpu_alloc_map_and_add_scangpuallocmap_mutation
branch
from
December 24, 2024 02:36
f679650
to
3df9731
Compare
3 tasks
jopemachine
changed the title
feat: Cache gpu_alloc_map, and Add ScanGPUAllocMap mutation
feat: Cache Dec 24, 2024
gpu_alloc_map
, and Add ScanGPUAllocMap
mutation
jopemachine
force-pushed
the
topic/12-24-feat_cache_gpu_alloc_map_and_add_scangpuallocmap_mutation
branch
from
December 24, 2024 03:31
06e7e47
to
68617a4
Compare
jopemachine
changed the title
feat: Cache
feat: Cache Dec 24, 2024
gpu_alloc_map
, and Add ScanGPUAllocMap
mutationgpu_alloc_map
, and Add ScanGPUAllocMaps
mutation
jopemachine
force-pushed
the
topic/12-24-feat_cache_gpu_alloc_map_and_add_scangpuallocmap_mutation
branch
from
December 24, 2024 03:59
41285f7
to
fa5ce5b
Compare
jopemachine
changed the title
feat: Cache
feat: Cache Dec 26, 2024
gpu_alloc_map
, and Add ScanGPUAllocMaps
mutationgpu_alloc_map
, and Add RescanGPUAllocMaps
mutation
…pc-auth-manager-keypair`
Co-authored-by: octodog <mu001@lablup.com>
jopemachine
changed the title
feat: Cache
feat: Cache Dec 26, 2024
gpu_alloc_map
, and Add RescanGPUAllocMaps
mutationgpu_alloc_map
in Redis, and Add RescanGPUAllocMaps
mutation
jopemachine
force-pushed
the
topic/06-13-feat_support_scanning_gpu_allocation
branch
from
December 26, 2024 06:57
cc44683
to
4704dd6
Compare
jopemachine
force-pushed
the
topic/12-24-feat_cache_gpu_alloc_map_and_add_scangpuallocmap_mutation
branch
from
December 26, 2024 06:58
d79ad90
to
26dd587
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:docs
Documentations
comp:manager
Related to Manager component
size:L
100~500 LoC
type:feature
Add new features
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.
Why?
Since
gpu_alloc_map
exists on the agent, querying this field requires an RPC call.In a production environment with multiple agents, repeatedly querying this field is inefficient and can significantly slow down response time.
How it works
This PR addresses the inefficiency by caching
gpu_alloc_map
in theREDIS_STAT_DB
, and introducesRescanGPUAllocMaps
mutation for updating this cache.RescanGPUAllocMaps
takesagent_id
as an argument to scan thegpu_alloc_map
of a specific agent. Or it can acceptNone
as an argument to iterate through all agents in the "Alive" state and scan their allocation maps.The scan results are cached in Redis in JSON format.
Example
For example, the key for the
alloc_map
of an agent with the IDi-ubuntu
will begpu_alloc_map.i-ubuntu
, and its value is like the below form.Checklist: (if applicable)
📚 Documentation preview 📚: https://sorna--3293.org.readthedocs.build/en/3293/
📚 Documentation preview 📚: https://sorna-ko--3293.org.readthedocs.build/ko/3293/