-
Notifications
You must be signed in to change notification settings - Fork 231
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
Adjustments to examples/softirq-latency-net-rx #349
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Change names to better reflect what they are measuring. Signed-off-by: Jesper Dangaard Brouer <hawk@kernel.org>
Buckets with usec resolution isn't enough for wait time latency. As we are loosing important variations in data. Increase resolution to nanosec also avoids a division (in this fastpath). Did a quick test modifying softirq_net_latency.bt bpftrace script to illustrate prod data: @latency_usecs[40]: [0] 200126 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| [1] 67007 |@@@@@@@@@@@@@@@@@ | [2, 4) 6604 |@ | [4, 8) 4856 |@ | [8, 16) 4641 |@ | [16, 32) 3753 | | [32, 64) 1438 | | [64, 128) 409 | | [128, 256) 78 | | [256, 512) 39 | | [512, 1K) 16 | | [1K, 2K) 9 | | [2K, 4K) 10 | | [4K, 8K) 1 | | [8K, 16K) 0 | | [16K, 32K) 1 | | @latency_ns[40]: [128, 256) 1391 | | [256, 512) 50599 |@@@@@@@@@@@@@@@@@ | [512, 1K) 153410 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| [1K, 2K) 62050 |@@@@@@@@@@@@@@@@@@@@@ | [2K, 4K) 6486 |@@ | [4K, 8K) 4804 |@ | [8K, 16K) 4675 |@ | [16K, 32K) 3648 |@ | [32K, 64K) 1392 | | [64K, 128K) 386 | | [128K, 256K) 72 | | [256K, 512K) 39 | | [512K, 1M) 15 | | [1M, 2M) 10 | | [2M, 4M) 9 | | [4M, 8M) 1 | | [8M, 16M) 0 | | [16M, 32M) 1 | | Signed-off-by: Jesper Dangaard Brouer <hawk@kernel.org>
This avoids hooking 'softirq_exit' as it can be expensive and for NET_RX this isn't the right hook as runtime is affected by NAPI packet bulking. Signed-off-by: Jesper Dangaard Brouer <hawk@kernel.org>
bobrik
reviewed
Feb 21, 2024
0454ab2
to
d52ae51
Compare
bobrik
approved these changes
Feb 21, 2024
netoptimizer
added a commit
to xdp-project/xdp-project
that referenced
this pull request
Feb 27, 2024
The histograms need to have higher resolution than usec. Buckets with usec resolution isn't enough for wait time latency. As we are loosing important variations in data. Increase resolution to nanosec also avoids a division (in this fastpath). Did a quick test modifying softirq_net_latency.bt bpftrace script to illustrate prod data: @latency_usecs[40]: [0] 200126 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| [1] 67007 |@@@@@@@@@@@@@@@@@ | [2, 4) 6604 |@ | [4, 8) 4856 |@ | [8, 16) 4641 |@ | [16, 32) 3753 | | [32, 64) 1438 | | [64, 128) 409 | | [128, 256) 78 | | [256, 512) 39 | | [512, 1K) 16 | | [1K, 2K) 9 | | [2K, 4K) 10 | | [4K, 8K) 1 | | [8K, 16K) 0 | | [16K, 32K) 1 | | @latency_ns[40]: [128, 256) 1391 | | [256, 512) 50599 |@@@@@@@@@@@@@@@@@ | [512, 1K) 153410 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| [1K, 2K) 62050 |@@@@@@@@@@@@@@@@@@@@@ | [2K, 4K) 6486 |@@ | [4K, 8K) 4804 |@ | [8K, 16K) 4675 |@ | [16K, 32K) 3648 |@ | [32K, 64K) 1392 | | [64K, 128K) 386 | | [128K, 256K) 72 | | [256K, 512K) 39 | | [512K, 1M) 15 | | [1M, 2M) 10 | | [2M, 4M) 9 | | [4M, 8M) 1 | | [8M, 16M) 0 | | [16M, 32M) 1 | | Similar change as ebpf-exporter PR: cloudflare/ebpf_exporter#349 Signed-off-by: Jesper Dangaard Brouer <hawk@kernel.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Making some adjustments to examples/softirq-latency-net-rx, prior to using this in prod.
(Related to PERF-1546)