Bug 1479384
Summary: | team loadbalance runner in active mode does not work properly | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Amit Supugade <asupugad> |
Component: | libteam | Assignee: | Xin Long <lxin> |
Status: | CLOSED NOTABUG | QA Contact: | Network QE <network-qe> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 7.4 | CC: | asupugad, atragler, lxin, mleitner |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-09-06 05:15:52 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Amit Supugade
2017-08-08 13:17:27 UTC
Okay but what are your results? the description of loadbalance runner in active mode in man doc seems different from kernel's behavior. loadbalance — To do passive load balancing, runner only sets up BPF hash function which will determine port for packet transmit. To do active load balancing, runner moves hashes among available ports trying to reach perfect balance. 'hashes' generated according to "tx_hash": ["eth", "ipv4", "ipv6"...] can you try with ping different daddr ? like: ping 192.168.1.254 ping 192.168.1.253 ping 192.168.1.252 ... The algorithm for tx_balancer is: there are 256 slots in the hashtable, one slot is mapped to one interface, like: hash 0x0 ---> eth1 hash 0x1 ---> eth1 ... hash 0xfc ---> eth2 hash 0xfd ---> eth2 hash 0xfe ---> eth1 when sending pkt: ================ get_hashkey by 'eth' or 'ipv4', then get the right interface from the hashtable on which it will send the pkt out. when rebalance: ============== This happened every 5 seconds by default or (runner.tx_balancer.balancing_interval), in which there is a loop where every time libteam gets the slot that has sent the most packet and choose the interface that has lowest loads, and remap the slot to this interface: 1. clear balance bytes for every interface(eth1.balance_bytes=0, eth2.balance_bytes=0) 2. get biggest_unprocessed_hash (like hash 0x10) and get least_loaded_port (eth1, 1st if both's balance_bytes are 0), then do map: "hash 0x10 ---> eth1", set this hash slot as processed, and set eth1.balance_bytes+=slot.bytes(in this 5 sec). 3. go to step 2, until no more unprocessed_hash. So in your test case, there's only one target ip(one hash slot used), it usually only chooses one of these two interface, according to the algorithm above. the rx_balance should work for the case like: [a] ping -c1 192.168.10.253 [b] ping -c1 192.168.10.253 [c] ping -c1 192.168.10.252 [d] ping -c1 192.168.10.251 a and b will go to eth1 c and d will go to eth2 Hi Amit, can you pls check bonding's rx_balance behavior ? This probably is not a bug. Since it works as expected, close it, pls reopen if you have any question. Thanks. |