Patent attributes
A network device, including ports that receive/send data packets from/to a network, receives data packets of multiple traffic flows, and populates a queue in memory with the data packets. The network device periodically updates a fair rate for the multiple traffic flows to converge a length of the queue to a reference length. Specifically, the network device determines a length of the queue, a change in the length from a previous length, and a deviation of the length from the reference length. The network device detects an increase in the change in length above a threshold that is based on the reference length. If the increase is not above the threshold, the network device derives the fair rate from a previous fair rate using proportional integral control. The network device identifies elephant flows among the multiple traffic flows, and sends the fair rate to a source of each elephant flow.