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

Improve #1153 by making the resource slot metadata query to be O(1) #1156

Closed
achimnol opened this issue Mar 10, 2023 · 0 comments · Fixed by #1157
Closed

Improve #1153 by making the resource slot metadata query to be O(1) #1156

achimnol opened this issue Mar 10, 2023 · 0 comments · Fixed by #1157
Assignees
Labels
comp:manager Related to Manager component type:enhance Enhance component, behavior, internals without user-facing features urgency:blocker IT SHOULD BE RESOLVED BEFORE NEXT RELEASE!
Milestone

Comments

@achimnol
Copy link
Member

achimnol commented Mar 10, 2023

Currently #1153 scans the whole agents table. When there are many agents, this will become very slow.

Let's store/update the resource slot metadata upon heartbeat processing using etcd or redis, so that we can read it at O(1) time. It would be better to avoid using postgresql because heartbeats may also increase the write load of the database. (In the future, we also need to migrate the agent status outside the SQL database!)

refs #1085

@achimnol achimnol added urgency:blocker IT SHOULD BE RESOLVED BEFORE NEXT RELEASE! comp:manager Related to Manager component type:enhance Enhance component, behavior, internals without user-facing features labels Mar 10, 2023
@achimnol achimnol added this to the 23.03 milestone Mar 10, 2023
@achimnol achimnol changed the title Improve #1151 by making the resource slot metadata query to be O(1) Improve #1153 by making the resource slot metadata query to be O(1) Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:manager Related to Manager component type:enhance Enhance component, behavior, internals without user-facing features urgency:blocker IT SHOULD BE RESOLVED BEFORE NEXT RELEASE!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants