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

Adjustments to examples/softirq-latency-net-rx #349

Merged
merged 3 commits into from
Feb 21, 2024

Commits on Feb 16, 2024

  1. examples/softirq-latency-net-rx: rename histograms

    Change names to better reflect what they are measuring.
    
    Signed-off-by: Jesper Dangaard Brouer <hawk@kernel.org>
    netoptimizer committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    b10a9e9 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2024

  1. examples/softirq-latency-net-rx: increase resolution to nanosec

    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>
    netoptimizer committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    c3aa5ed View commit details
    Browse the repository at this point in the history
  2. examples/softirq-latency-net-rx: easy way to disable measuring 'runtime'

    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>
    netoptimizer committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    d52ae51 View commit details
    Browse the repository at this point in the history