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

Optimize the parallel tx set building implementation. #4637

Closed
wants to merge 2 commits into from

Conversation

dmkozh
Copy link
Contributor

@dmkozh dmkozh commented Feb 3, 2025

Description

Also add a simple benchmark in case further improvements are necessary. The changes resulted in up to 20x speedup for some scenarios on my laptop

  • Avoid unnecessary copies of clusters (use shared ptr instead)
  • Precompute conflicting transactions, which speeds up low-conflict scenarios very significantly (and this is what we expect to see the most)
  • Some minor optimizations to avoid doing work when possible

Also updated a flaky test scenario.

This is rebased on #4486

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

This is a relatively simple algorithm, but it should be serviceable for traffic with relatively low amount of transitive IO conflicts.
Also add a simple benchmark in case further improvements are necessary. The changes resulted in up to 20x speedup for some scenarios on my laptop

- Avoid unnecessary copies of clusters (use shared ptr instead)
- Precompute conflicting transactions, which speeds up low-conflict scenarios very significantly (and this is what we expect to see the most)
- Some minor optimizations to avoid doing work when possible

Also updated a flaky test scenario.
@dmkozh dmkozh force-pushed the parallel_txset_nomination_opt branch from 0ba78fb to 46bc3a5 Compare February 4, 2025 18:02
@SirTyson SirTyson mentioned this pull request Feb 11, 2025
5 tasks
@dmkozh dmkozh closed this Feb 20, 2025
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.

1 participant