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

feat(benches): add binaries to bench scaling of non-conflicting transactions #240

Merged
merged 11 commits into from
Dec 3, 2024

Conversation

imrn99
Copy link
Collaborator

@imrn99 imrn99 commented Nov 27, 2024

Description

Scope: benches

Type of change: new feature

Content description:

add two binaries, shift and shift-nc. both programs generate a grid and iterate on inner vertices, computing the average of their neighbors and taking it as new value. this is repeated for N rounds.

the main loop is parallelized using rayon, the easiest way to control execution resource is to use taskset.

shift-nc differs from shift by splitting the vertices into to independent batches before processing those. the intended effect is to decouple iterations that could conflict with each other, resulting in no transaction falures and retries.

Additional information

  • New dependency: rayon

Possible follow-up

  • larger scale tests
  • add parallelism to predefined kernels

@codecov-commenter
Copy link

codecov-commenter commented Nov 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.97%. Comparing base (a924645) to head (cb24350).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #240      +/-   ##
==========================================
- Coverage   79.21%   78.97%   -0.25%     
==========================================
  Files          52       52              
  Lines        6953     6834     -119     
==========================================
- Hits         5508     5397     -111     
+ Misses       1445     1437       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@cedricchevalier19 cedricchevalier19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two new programs are benchmarks, but what is the performance metric?

benches/src/shift.rs Show resolved Hide resolved
benches/src/shift_no_conflict.rs Show resolved Hide resolved
@imrn99
Copy link
Collaborator Author

imrn99 commented Dec 3, 2024

The two new programs are benchmarks, but what is the performance metric?

The main metric of interest is execution time, to evaluate how well our implementation scales. Both weak and strong scaling can be estimated by controlling grid size and # of thread used.

We don't necessarily care about flat exec time since we don't have anything to compare against, and I'm not even sure the algorithm makes too much sense meshing-wise.

@imrn99
Copy link
Collaborator Author

imrn99 commented Dec 3, 2024

As an indication, I'm reaching quasi ideal speedup for 1000 rounds on a 512*512 map, from 1 to 12 threads (from 92s down to 12s, given that map creation is not parallelized)

@imrn99 imrn99 merged commit 4a4687c into master Dec 3, 2024
12 of 13 checks passed
@imrn99 imrn99 deleted the simple-vertex-relaxation branch December 3, 2024 15:27
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.

3 participants