RPS software fork of RSS

Hello! Recently i found one beautiful solution – fork of RSS.
RPS Receive Packet Steering.

Receive Packet Steering (RPS) is similar to RSS in that it is used to direct packets to specific CPUs for processing. However, RPS is implemented at the software level, and helps to prevent the hardware queue of a single network interface card from becoming a bottleneck in network traffic.
RPS has several advantages over hardware-based RSS:

RPS can be used with any network interface card.
It is easy to add software filters to RPS to deal with new protocols.
RPS does not increase the hardware interrupt rate of the network device. However, it does introduce inter-processor interrupts.

via https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Performance_Tuning_Guide/network-rps.html

We need a Binary table (filled zeros number = count of CPU cores, for example 24 cores CPU):
RPS handle tx or/and rx queues by spesified core/cores.
If we want appoint first and second cores to rx 16 queue we shoud consist table (cpus from right to left)
Divide the binary number into sets of 4 digits
0000 0000 0000 0000 0000 0011
and convert it to hex type
Then do
echo "000003" > /sys/class/net/eth0/queues/rx-15/rps_cpus (because queues starting from zero)
Another queues we can appoint too. Thats all 🙂

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.