Combined congestion control and load balancing
Technologies for optimizing the spreading of traffic across multiple local output ports while considering both local load and end-to-end (E2E) load are described. One device has multiple outgoing ports and a network adapter that determines, for a first flow of packets, a first end-to-end (E2E) congestion rate of at least some of the outgoing ports. The network adapter determines a port state of at least some of the outgoing ports. The network adapter receives a first packet associated with the first flow of packets. The network adapter determines, using a first desired rate for the first flow, the first E2E congestion rates, and the port states, i) a first time at which the first packet is to be transmitted and ii) a first outgoing port on which the first packet is to be transmitted. The first packet is sent on the first outgoing port at the first time.
1. A device comprising:
a plurality of outgoing ports; and
a network adapter coupled to the plurality of outgoing ports, wherein the network adapter is to:
send a plurality of packets to one or more other devices on the plurality of outgoing ports;
measure, using acknowledgements of at least some of the plurality of packets, round trip times (RTTs) for the plurality of packets;
determine, for a first flow of packets using the RTTs, a first end-to-end (E2E) congestion rate of at least a portion of the plurality of outgoing ports;
measure one or more local metrics of one or more hardware resources associated with each of the plurality of outgoing ports;
determine, using the one or more local metrics, a port congestion level of at least a portion of the plurality of outgoing ports;
identify a first desired rate for the first flow of packets;
receive a first packet associated with the first flow of packets;
determine, using the first desired rate, the first E2E congestion rates, and the port congestion levels, i) a first time at which the first packet is to be transmitted and ii) a first outgoing port of the plurality of outgoing ports on which the first packet is to be transmitted; and
send, at the first time, the first packet on the first outgoing port.
2. The device of claim 1 , wherein the network adapter is further to:
determine, for at least a portion of the plurality of outgoing ports, a score using the respective port congestion level and the respective first E2E congestion rate;
determine a subset of the plurality of outgoing ports, each outgoing port of the subset having a score that satisfies a threshold criterion; and
determine that the first outgoing port satisfies a scoring criterion relative to the other outgoing ports in the subset of the plurality of outgoing ports.
3. The device of claim 1 , wherein the network adapter is further to:
determine, for a second flow of packets, a second E2E congestion rate of at least a portion of the plurality of outgoing ports;
identify a second desired rate for the second flow of packets;
receive a second packet associated with the second flow of packets;
determine, using the second desired rate, the second E2E congestion rates, and the port congestion levels, i) a second time at which the second packet is to be transmitted and ii) a second outgoing port of the plurality of outgoing ports on which the second packet is to be transmitted; and
send, at the second time, the second packet on the second outgoing port.
4. The device of claim 3 , wherein the first outgoing port and the second outgoing port are the same.
5. The device of claim 3 , wherein the network adapter is further to:
determine, for at least a portion of the plurality of outgoing ports, a score using the respective port congestion level and the respective second E2E congestion rate;
determine a subset of the plurality of outgoing ports, each outgoing port of the subset having a score that satisfies a threshold criterion; and
determine that the second outgoing port satisfies a scoring criterion relative to the other outgoing ports in the subset of the plurality of outgoing ports.
6. The device of claim 1 , wherein, to determine i) the first time and ii) the first outgoing port, the network adapter is further to:
determine a first score for the first outgoing port using a first congestion level of the first outgoing port and the first E2E congestion rate of the first outgoing port;
determine a second score for a second outgoing port using a second congestion level of the second outgoing port and a second E2E congestion rate of the second outgoing port;
determine that the first score and the second score each satisfy a threshold criterion; and
determine that the first score is less than the second score.
7. The device of claim 6 , wherein the network adapter is further to:
determine, for a second flow of packets, a second E2E congestion rate of at least a portion of the plurality of outgoing ports;
identify a second desired rate for the second flow of packets;
receive a second packet associated with the second flow of packets;
determine, using the second desired rate, the second E2E congestion rates, and the port congestion levels, a second time at which the second packet is to be transmitted;
determine a third score for the first outgoing port using the first congestion level of the first outgoing port and the second E2E congestion rate of the first outgoing port;
determine a fourth score for the second outgoing port using the second congestion level of the second outgoing port and the second E2E congestion rate of the second outgoing port;
determine the second packet is to be transmitted on the second outgoing port based on the fourth score being less than the third score; and
send, at the second time, the second packet on the second outgoing port.
8. The device of claim 1 , wherein the one or more local metrics comprises at least one of:
a number of outstanding packets in one or more allocated buffers associated with the corresponding outgoing port;
a transmission rate of the corresponding outgoing port over a period;
a number of the one or more allocated buffers associated with the corresponding outgoing port; or
a congestion level of the one or more allocated buffers associated with the corresponding outgoing port.
9. The device of claim 1 , wherein the network adapter is further to receive the first desired rate from a congestion control algorithm.
10. A method of operating a network adapter, the method comprising:
sending a plurality of packets to one or more other devices on a plurality of outgoing ports;
measuring, using acknowledgements of at least some of the plurality of packets, round trip times (RTTs) for the plurality of packets;
determining, for a first flow of packets using the RTTs, a first end-to-end (E2E) congestion rate of at least a portion of the plurality of outgoing ports;
measuring one or more local metrics of one or more hardware resources associated with each of the plurality of outgoing ports;
determining, using the one or more local metrics, a port congestion level of at least a portion of the plurality of outgoing ports;
identifying a first desired rate for the first flow of packets;
receiving a first packet associated with the first flow of packets;
determining, using the first desired rate, the first E2E congestion rates, and the port congestion levels, i) a first time at which the first packet is to be transmitted and ii) a first outgoing port of the plurality of outgoing ports on which the first packet is to be transmitted; and
sending, at the first time, the first packet on the first outgoing port.
11. The method of claim 10 , further comprising:
determining, for a second flow of packets, a second E2E congestion rate of at least a portion of the plurality of outgoing ports;
identifying a second desired rate for the second flow of packets;
receiving a second packet associated with the second flow of packets;
determining, using the second desired rate, the second E2E congestion rates, and the port congestion levels, i) a second time at which the second packet is to be transmitted and ii) a second outgoing port of the plurality of outgoing ports on which the second packet is to be transmitted; and
sending, at the second time, the second packet on the second outgoing port.
12. The method of claim 11 , further comprising:
determining, for at least a portion of the plurality of outgoing ports, a score using the respective port congestion level and the respective second E2E congestion rate;
determining a subset of the plurality of outgoing ports, each outgoing port of the subset having a score that satisfies a threshold criterion; and
determining that the second outgoing port satisfies a scoring criterion relative to the other outgoing ports in the subset of the plurality of outgoing ports.
13. The method of claim 11 , wherein the first outgoing port and the second outgoing port are the same.
14. The method of claim 10 , wherein determining i) the first time and ii) the first outgoing port comprises:
determining a first score for the first outgoing port using a first congestion level of the first outgoing port and the first E2E congestion rate of the first outgoing port;
determining a second score for the second outgoing port using a second congestion level of the second outgoing port and the first E2E congestion rate of the second outgoing port;
determining that the first score and the second score each satisfy a threshold criterion; and
determining that the first score is less than the second score.
15. The method of claim 14 , further comprising:
determining, for a second flow of packets, a second E2E congestion rate of at least a portion of the plurality of outgoing ports;
identifying a second desired rate for the second flow of packets;
receiving a second packet associated with the second flow of packets;
determining, using the second desired rate, the second E2E congestion rates, and the port congestion levels, a second time at which the second packet is to be transmitted;
determining a third score for the first outgoing port using the first congestion level of the first outgoing port and the second E2E congestion rate of the first outgoing port;
determining a fourth score for the second outgoing port using the second congestion level of the second outgoing port and the second E2E congestion rate of the second outgoing port;
determining the second packet is to be transmitted on the second outgoing port based on the fourth score being less than the third score; and
sending, at the second time, the second packet on the second outgoing port.
16. The method of claim 14 , further comprising:
determining, for at least a portion of the plurality of outgoing ports, a score using the respective port congestion level and the respective first E2E congestion rate;
determining a subset of the plurality of outgoing ports, each outgoing port of the subset having a score that satisfies a threshold criterion; and
determining that the first outgoing port satisfies a scoring criterion relative to the other outgoing ports in the subset of the plurality of outgoing ports.
17. A system comprising:
a memory;
a processor operatively coupled to the memory; and
a network adapter operatively coupled to the processor, wherein the network adapter is to:
send a plurality of packets to one or more other devices on the plurality of outgoing ports;
measure, using acknowledgements of at least some of the plurality of packets, round trip times (RTTs) for the plurality of packets;
determine, for a first flow of packets, a first end-to-end (E2E) congestion rate of at least a portion of the plurality of outgoing ports;
measure one or more local metrics of one or more hardware resources associated with each of the plurality of outgoing ports;
determine, using the one or more local metrics, a port congestion level of at least a portion of the plurality of outgoing ports;
identify a first desired rate for the first flow of packets;
receive a first packet associated with the first flow of packets;
determine, using the first desired rate, the first E2E congestion rates, and the port congestion levels, i) a first time at which the first packet is to be transmitted and ii) a first outgoing port of the plurality of outgoing ports on which the first packet is to be transmitted; and
send, at the first time, the first packet on the first outgoing port.
18. The system of claim 17 , wherein the network adapter is further to:
determine, for a second flow of packets, a second E2E congestion rate of at least a portion of the plurality of outgoing ports;
identify a second desired rate for the second flow of packets;
receive a second packet associated with the second flow of packets;
determine, using the second desired rate, the second E2E congestion rates, and the port congestion levels, i) a second time at which the second packet is to be transmitted and ii) a second outgoing port of the plurality of outgoing ports on which the second packet is to be transmitted; and
send, at the second time, the second packet on the second outgoing port.
19. The system of claim 18 , wherein the network adapter is further to:
determine, for at least a portion of the plurality of outgoing ports, a score using the respective port congestion level and the respective second E2E congestion rate;
determine a subset of the plurality of outgoing ports, each outgoing port of the subset having a score that satisfies a threshold criterion; and
determine that the second outgoing port satisfies a scoring criterion relative to the other outgoing ports in the subset of the plurality of outgoing ports.
20. The system of claim 17 , wherein the network adapter is further to:
determine, for at least a portion of the plurality of outgoing ports, a score using the respective port congestion level and the respective first E2E congestion rate;
determine a subset of the plurality of outgoing ports, each outgoing port of the subset having a score that satisfies a threshold criterion; and
determine that the first outgoing port satisfies a scoring criterion relative to the other outgoing ports in the subset of the plurality of outgoing ports.