Skip to content

ratio should be per thread+interface, not per thread #3

@pimvanpelt

Description

@pimvanpelt

Currently, the sampling ratio is a global setting for the plugin.

The main concern is that a VPP instance may have 1G and 100G interfaces, or it may have some interfaces with lower and higher traffic levels even if they are the same port speed (eg loaded only 1-5Mbit on 10G versus 8Gbit on 10G).

But I think this might become problematic for a more fundamental reason:

Assume Interface A wants 1:1000 and Interface B also wants 1:1000

Problem 1:
If we have two interface each with 1 RX queue, we may place them on the same worker:

set int rx-placement A worker 1
set int rx-placement B worker 1

Now the same node process sflow on worker 1 will be sampling packets from the vector at 1:1000, and some packets will be from in=A and others will be in=B. Result: neither A nor B will have a sampling rate of 1:1000

Problem 2:
If we have one interface with 2 RX queues, we may place these on different workers:

set int rx-placement A queue 0 worker 1
set int rx-placement A queue 1 worker 2

Now the interface will have sampling of 1:1000 on worker1 and 1:1000 on worker2, and will effectively sample 1:500 packets from interface A.

Is it a problem if the effective rate is different to the configured rate (can be up to 10x lower in the case of many interfaces one the thread, or 10x overshoot in the case of many threads servicing one interface) ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions