Skip to content

Commit

Permalink
udev-rule: rationale for applying the rule on virtual interfaces
Browse files Browse the repository at this point in the history
We should apply the rule on the virtual interfaces of the host, because of the RPS mask that would be consulted,
is the one on the RX side of the veth in the host.
Consider the following diagram:
Pod A <veth1 - veth2> host <veth3 - veth4> Pod B
veth2's RPS affinity is the one determining the CPUs that are handling the packet processing when sending data from Pod A to pod B.

Additional common scenarios:
1. Pod A = sender, host = receiver
  The RPS affinity of the host side should be consulted (because it’s the receiver) and it should be set to cpus not sensitive to preemption (reserved pool).

2. Pod A = receiver, host = sender
  In case of no RPS mask on the receiver side, the sender needs to pay the price and do all the processing on its cores.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
  • Loading branch information
Tal-or committed Nov 23, 2022
1 parent 9359fb3 commit 0fa2bef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions assets/performanceprofile/configs/99-netdev-rps.rules
@@ -1 +1,11 @@
# We should apply the rule on the virtual interfaces of the host, because of the RPS mask that would be consulted,
# is the one on the RX side of the veth in the host.
# Consider the following diagram:
# Pod A <veth1 - veth2> host <veth3 - veth4> Pod B
# veth2's RPS affinity is the one determining the CPUs that are handling the packet processing when sending data from Pod A to pod B.
# Additional common scenarios:
# 1. Pod A = sender, host = receiver
# The RPS affinity of the host side should be consulted (because it’s the receiver) and it should be set to cpus not sensitive to preemption (reserved pool).
# 2. Pod A = receiver, host = sender
# In case of no RPS mask on the receiver side, the sender needs to pay the price and do all the processing on its cores.
SUBSYSTEM=="net", ACTION=="add", ENV{ID_BUS}!="pci", TAG+="systemd", ENV{SYSTEMD_WANTS}="update-rps@%k.service"
Expand Up @@ -60,7 +60,7 @@ spec:
path: /etc/crio/crio.conf.d/99-runtimes.conf
user: {}
- contents:
source: data:text/plain;charset=utf-8;base64,U1VCU1lTVEVNPT0ibmV0IiwgQUNUSU9OPT0iYWRkIiwgRU5We0lEX0JVU30hPSJwY2kiLCBUQUcrPSJzeXN0ZW1kIiw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