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 per-cpu fanout mode #35

Merged
2 commits merged into from
Mar 28, 2024
Merged

Add per-cpu fanout mode #35

2 commits merged into from
Mar 28, 2024

Conversation

pikrzysztof
Copy link
Contributor

@pikrzysztof pikrzysztof commented Mar 25, 2024

see #33

By assigning packets on per-cpu basis we ensure kernel's skb structure (incl locks) gets shared across fewer cores than other fanout strategies. This should result in higher throughput/lower resource usage.

As per man 8 ethtool, all the valid -N -U --config-nfc --config-ntuple options make sure flows get always scheduled to the same core so by using PACKET_FANOUT_CPU we ensure that packets from the same flow get assigned to the same socket.

Let's give it a try!

see #33

By assigning packets on per-cpu basis we ensure kernel's skb
structure (incl locks) gets shared across fewer cores than other
fanout strategies. This should result in higher throughput/lower
resource usage.

As per `man 8 ethtool`, all the valid `-N -U --config-nfc
--config-ntuple` options make sure flows get always scheduled to the
same core so by using PACKET_FANOUT_CPU we ensure that packets from
the same flow get assigned to the same socket.

Let's give it a try
@pikrzysztof pikrzysztof changed the base branch from master to next March 27, 2024 15:08
@pikrzysztof
Copy link
Contributor Author

This helped quite a lot, see https://github.com/kentik/operations/issues/8982#issuecomment-2020149647 - can we please merge this?

@pikrzysztof pikrzysztof marked this pull request as ready for review March 27, 2024 15:09
@pikrzysztof pikrzysztof requested a review from a user March 27, 2024 15:09
@ghost ghost merged commit c1dd0f1 into next Mar 28, 2024
12 of 14 checks passed
@ghost ghost deleted the kris--cpuhash branch March 28, 2024 00:24
@ghost
Copy link

ghost commented Mar 28, 2024

Thanks @pikrzysztof!

ghost pushed a commit that referenced this pull request Mar 28, 2024
* Add per-cpu fanout mode

see #33

By assigning packets on per-cpu basis we ensure kernel's skb
structure (incl locks) gets shared across fewer cores than other
fanout strategies. This should result in higher throughput/lower
resource usage.

As per `man 8 ethtool`, all the valid `-N -U --config-nfc
--config-ntuple` options make sure flows get always scheduled to the
same core so by using PACKET_FANOUT_CPU we ensure that packets from
the same flow get assigned to the same socket.

Let's give it a try

* fix indentation

---------

Co-authored-by: Will <[email protected]>
This pull request was closed.
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.

1 participant