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

Replace work_lib hash table with ordered map #13950

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

georgeee
Copy link
Member

Snark coordinator's Get_work RPC takes 400 ms to run on average.
With 20 workers, it puts a large burden onto snark coordinator.

This fix trims down Get_work RPC time to around 20 ms.

Explain your changes:

  • Replace usage of hashtable with an ordered map

Explain how you tested your changes:

  • Tested on a cluster with a snark coordinator and 20 workers with transaction generation set on
  • Tested before and after the fix, snark coordinator's health improved substantially (it stopped being almost always out of sync)

Checklist:

  • Dependency versions are unchanged
    • Notify Velocity team if dependencies must change in CI
  • Modified the current draft of release notes with details on what is completed or incomplete within this project
  • Document code purpose, how to use it
    • Mention expected invariants, implicit constraints
  • Tests were added for the new behavior
    • Document test purpose, significance of failures
    • Test names should reflect their purpose
  • All tests pass (CI will check this if you didn't)
  • Serialized types are in stable-versioned modules
  • Does this close issues?

@georgeee georgeee requested a review from a team as a code owner August 24, 2023 14:22
@georgeee georgeee assigned georgeee and unassigned georgeee Aug 24, 2023
@georgeee georgeee force-pushed the nathan/use-ordered-map-in-work_lib branch from a794556 to 1e223a1 Compare August 25, 2023 17:23
@georgeee georgeee self-assigned this Aug 28, 2023
@georgeee georgeee force-pushed the nathan/use-ordered-map-in-work_lib branch from 1e223a1 to c15be5f Compare August 29, 2023 16:10
@georgeee
Copy link
Member Author

!ci-build-me

@georgeee georgeee force-pushed the nathan/use-ordered-map-in-work_lib branch from c15be5f to 290bae3 Compare August 29, 2023 21:26
@georgeee
Copy link
Member Author

!ci-build-me

@nholland94
Copy link
Member

!approved-for-mainnet

@georgeee georgeee merged commit 84976f7 into berkeley Aug 30, 2023
50 checks passed
@georgeee georgeee deleted the nathan/use-ordered-map-in-work_lib branch August 30, 2023 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants