Ixgbe RSS Principle Analysis

Source: Internet
Author: User

This month, has been engaged in Ixgbe RSS, hoping to make the package balanced, the results are unsuccessful, but the network card to understand the principle of more depth.

1, the network card hardware through the network cable or fiber packet.

2, the network card RSS function According to the net five to calculate the 32bit hash value,

The mapping relationship between the low 7 bits (0-127) and the NIC queue based on the hash value,

Put the received packets on a queue.

3, do the CPU affinity binding, a queue of packets on a corresponding core to deal with.

The Reta register is responsible for establishing a mapping relationship between the low 7 bits of the hash value and the NIC queue, and the Ixge driver's default mapping relationship is fairly balanced.

Take 12 queues For example, mapping relationships such as:

Now the problem with the online machine is: Because of the large amount of data exchanged between the Haproxy in the LAN machine, some

Five-tuple comparison concentration, resulting in a low 7-bit comparison of hash values, resulting in queue comparison, the corresponding core load is also large

As shown in.

I think of two ways to avoid a high core usage rate.

Method One, adopt Round-robin strategy, periodically modify the Reta register, the first time is [0-11], the second time is [1-11,0],

The third time is [2-11,0,1] and so on, so that each queue packet looks more balanced, but does not change the core usage.

Method Two, generate random values, according to how much to determine the weight, and finally based on the weight to generate the queue number,

In this way, fewer queues are received, and fewer queues are received.

However, the actual test of both methods have no effect, can not get through.

Ixgbe RSS Principle Analysis

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.