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 the gpu indexing with the change in number of nodes #322

Closed
Tracked by #1489
xmonader opened this issue Aug 13, 2023 · 5 comments
Closed
Tracked by #1489

improve the gpu indexing with the change in number of nodes #322

xmonader opened this issue Aug 13, 2023 · 5 comments
Assignees
Labels
grid-proxy belongs to grid proxy type_feature New feature or request

Comments

@xmonader
Copy link
Contributor

Right now we run the indexing goroutine every 1hr (it's configurable), however maybe we should also do better if the number of the nodes changes before and after? and we can even improve by indexing the newest ones first?

@xmonader xmonader added the type_feature New feature or request label Aug 13, 2023
@xmonader xmonader added this to 3.11.x Aug 13, 2023
@xmonader xmonader moved this to Accepted in 3.11.x Aug 13, 2023
@xmonader xmonader added this to the 1.0.0 milestone Aug 13, 2023
@xmonader xmonader moved this from Accepted to In Progress in 3.11.x Aug 13, 2023
@Omarabdul3ziz
Copy link
Contributor

we kept the periodically running ticker to requery the nodes and upsert the GPUs info each hour.
also for newly added nodes a Postgres trigger is added on the node table which will notify the client with the added node twin id and then the client will ask the node with an RMB call if it has a GPU or not.

but this focus on enhancing the indexing process for newly added nodes, not for the nodes updated with add/remove gpu, also considered using a trigger depending on another field that changes whenever a new GPU is added, even if it's added to a node already in the table. but couldn't find something like that

do you have any suggestions or immediately indexing the new node is enough?

@rawdaGastan rawdaGastan added the grid-proxy belongs to grid proxy label Aug 16, 2023
@AbdelrahmanElawady AbdelrahmanElawady moved this to In Progress in 3.12.x Sep 11, 2023
@Omarabdul3ziz Omarabdul3ziz moved this from In Progress to Blocked in 3.12.x Oct 16, 2023
@xmonader xmonader moved this from Blocked to In Progress in 3.12.x Oct 22, 2023
@Omarabdul3ziz Omarabdul3ziz moved this from In Progress to In Verification in 3.12.x Oct 30, 2023
@A-Harby
Copy link
Contributor

A-Harby commented Oct 31, 2023

When a new node is added with a GPU, the Postgres database is triggered with notify_nodes_count_changed, and the node data is added.

For enhancement, it will be more visible on the mainnet, and if more improvement is needed, reopen the issue.

@A-Harby A-Harby closed this as completed Oct 31, 2023
@github-project-automation github-project-automation bot moved this from In Verification to Done in 3.12.x Oct 31, 2023
@Omarabdul3ziz
Copy link
Contributor

Update:
had to reopen this because the implementation wasn't stable, had a bit more complexity than needed, and relied on a postgres feature.
we rolled back the code using these two prs #475 and #480.
and a new release v0.11.6 without these changes is now deployed.

Note:
consider checking the last row in the node table and, if it's changed, trigger a reindex

@Omarabdul3ziz Omarabdul3ziz reopened this Nov 14, 2023
@Omarabdul3ziz Omarabdul3ziz removed this from 3.12.x Nov 14, 2023
@Omarabdul3ziz Omarabdul3ziz moved this to Accepted in 3.13.x Nov 14, 2023
@xmonader xmonader removed this from 3.13.x Nov 23, 2023
@xmonader xmonader added this to 3.14.x Nov 23, 2023
@Omarabdul3ziz Omarabdul3ziz removed this from 3.14.x Nov 26, 2023
@Omarabdul3ziz Omarabdul3ziz moved this to In Progress in 3.13.x Nov 26, 2023
@Omarabdul3ziz Omarabdul3ziz moved this from In Progress to Pending review in 3.13.x Nov 26, 2023
@AbdelrahmanElawady AbdelrahmanElawady moved this from Pending review to In Verification in 3.13.x Dec 11, 2023
@ramezsaeed
Copy link

Current implementation:

  • each 1 hour the indexer will call all the nodes to get its' gpu info if it has one
  • each 5 min a check will run to watch the node table count if it is changed it will trigger the indexer to run, if not it will do nothing

@ramezsaeed
Copy link

ramezsaeed commented Dec 19, 2023

@xmonader xmonader closed this as completed Apr 1, 2024
@github-project-automation github-project-automation bot moved this from In Verification to Done in 3.13.x Apr 1, 2024
@rawdaGastan rawdaGastan modified the milestones: 1.0.0, v0.13.x - v0.14.x Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grid-proxy belongs to grid proxy type_feature New feature or request
Projects
No open projects
Status: Done
Development

No branches or pull requests

6 participants