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

Add ring buffer tests #39

Merged
merged 40 commits into from
Apr 18, 2024
Merged

Conversation

gtrevi
Copy link
Contributor

@gtrevi gtrevi commented Mar 29, 2024

This PR adds two more tests to the ring buffer (for both Linux and Windows), running concurrently on all CPUs and averaging buffer sizes of ~150/200Mb:

  • 300K concurrent iterations effectively writing 400 bytes.
  • 100K concurrent iterations effectively writing 1420 bytes (i.e. a similar MTU size).

Each test will run with a bpf program that will appropriately size the ring buffer so to actually write all the payloads for each and every iteration, therefore without any skipping due the ring buffer being filled.

This is useful to emulate scenarios where multiple concurrent producers of data (e.g., packets) of different sizes need to store them in a ring-buffer map, and for which understanding the ring buffer latency is important.

Additionally, the PR adds flexible parameter number support, for tests requiring more than one parameter.

@Alan-Jowett
Copy link
Member

Please rebase or merge.

@Alan-Jowett
Copy link
Member

@gtrevi Please rebase or merge.

gtrevi and others added 6 commits April 4, 2024 11:14
Signed-off-by: Gianni Trevisiol <gtrevi@microsoft.com>
Signed-off-by: Gianni Trevisiol <gtrevi@microsoft.com>
Signed-off-by: Gianni Trevisiol <gtrevi@users.noreply.github.com>
@gtrevi gtrevi marked this pull request as draft April 8, 2024 05:13
gtrevi and others added 9 commits April 7, 2024 22:13
Signed-off-by: Gianni Trevisiol <gtrevi@users.noreply.github.com>
Signed-off-by: Gianni Trevisiol <gtrevi@users.noreply.github.com>
Signed-off-by: Gianni Trevisiol <gtrevi@users.noreply.github.com>
Signed-off-by: Gianni Trevisiol <gtrevi@users.noreply.github.com>
Signed-off-by: Gianni Trevisiol <gtrevi@microsoft.com>
Signed-off-by: Gianni Trevisiol <gtrevi@microsoft.com>
@gtrevi gtrevi marked this pull request as ready for review April 16, 2024 23:07
@gtrevi gtrevi requested a review from Alan-Jowett April 16, 2024 23:07
bpf/CMakeLists.txt Outdated Show resolved Hide resolved
@gtrevi gtrevi requested a review from Alan-Jowett April 18, 2024 17:20
@Alan-Jowett Alan-Jowett merged commit 3215d06 into microsoft:main Apr 18, 2024
20 of 21 checks passed
@gtrevi gtrevi deleted the gtrevi/add-rb-tests branch May 7, 2024 23:24
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.

2 participants