WO2019174536A1 - 拥塞控制方法及网络设备 - Google Patents

拥塞控制方法及网络设备 Download PDF

Info

Publication number
WO2019174536A1
WO2019174536A1 PCT/CN2019/077599 CN2019077599W WO2019174536A1 WO 2019174536 A1 WO2019174536 A1 WO 2019174536A1 CN 2019077599 W CN2019077599 W CN 2019077599W WO 2019174536 A1 WO2019174536 A1 WO 2019174536A1
Authority
WO
WIPO (PCT)
Prior art keywords
period
queue
network device
congestion threshold
traffic load
Prior art date
Application number
PCT/CN2019/077599
Other languages
English (en)
French (fr)
Inventor
冀智刚
曲迪
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP19766483.2A priority Critical patent/EP3758315B1/en
Publication of WO2019174536A1 publication Critical patent/WO2019174536A1/zh
Priority to US17/018,566 priority patent/US11233746B2/en
Priority to US17/645,411 priority patent/US11652752B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/31Flow control; Congestion control by tagging of packets, e.g. using discard eligibility [DE] bits
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6255Queue scheduling characterised by scheduling criteria for service slots or service orders queue load conditions, e.g. longest queue first
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/28Flow control; Congestion control in relation to timing considerations

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a congestion control method and a network device.
  • ECN Explicit Congestion Notification
  • the user manually configures the congestion threshold on the queue of the network device.
  • the network device can be out.
  • the packet of the queue is marked, and the marked packet is sent to the receiving device.
  • the receiving device can notify the sending device to reduce the packet sending rate, so as to reduce the congestion of the network device.
  • the implementation of ECN is a static fixed method, which requires the user to manually configure a fixed congestion threshold.
  • the fixed congestion threshold does not meet the diverse needs.
  • the congestion threshold is high, the queue caches a large amount of packets, the cache capability of the network device is high, the round-trip delay (RTT) of the packet is long, and the congestion threshold is low. Lower, bandwidth utilization is lower. Based on this, how to configure the appropriate congestion threshold to meet the diversified needs of the traffic model is a technical problem that needs to be solved.
  • the technical problem to be solved in the embodiments of the present application is to provide a congestion control method and a network device, which can automatically set a congestion threshold of the queue based on the traffic load of the queue, and improve the queue when the amount of packets buffered by the queue is small. Throughput, improve congestion control efficiency.
  • the embodiment of the present application provides a congestion control method, where a network device may increase a congestion threshold by a fixed value after the end of the first period, and then detect an average traffic load of the queue on the network device minus a second period. Whether the difference of the average traffic load of the queue in the first period is greater than the target increase value, and setting a congestion threshold according to the result of the detection after the end of the second period, where the first period is the previous period of the second period.
  • the network device marks the received packet, and the marked packet is enqueued into the queue. The label indicates that congestion occurs on the network device, and the network device can exit the queue.
  • the marked message of the team is sent to the receiving device.
  • the network device may detect, after increasing the congestion threshold, whether the difference between the average traffic load of the queue and the average traffic load of the queue before increasing the congestion threshold is greater than the target increase value, and then according to The result of the detection is set to the congestion threshold, which can implement the queue-based traffic load and automatically set the congestion threshold of the queue.
  • the congestion threshold which can implement the queue-based traffic load and automatically set the congestion threshold of the queue.
  • the network device sets a congestion threshold according to the result of the detection, which may be: when the result of the detection is yes, the network device keeps the congestion threshold after increasing the fixed value. The average traffic load increases beyond the target value, and the increased threshold is a more appropriate threshold than the pre-increment threshold.
  • the network device sets a congestion threshold according to the result of the detection, which may be: when the result of the detection is no and the difference is not less than the target reduction value, the network device increases the congestion threshold after adding a fixed value. Go to a fixed value. The average traffic load growth does not exceed the target value, the waterline does not need to be upgraded, and the threshold before the increase is a more suitable threshold.
  • the network device sets a congestion threshold according to the result of the detection, and specifically, when the result of the detection is no and the difference is smaller than the target reduction value, the network device adds a fixed value.
  • the subsequent congestion threshold is multiplied by the ratio of the average traffic load of the queue during the second period to the average traffic load of the queue during the first period.
  • the threshold is directly adjusted proportionally, and the threshold can be quickly adjusted to an appropriate level.
  • the network device when the network device detects that the average traffic load of the queue in the third period minus the average traffic load of the queue in the last period of the third period is less than the target reduction value, the network device may After the end of the three cycles, the congestion threshold is multiplied by the ratio of the average traffic load of the queue in the third cycle to the average traffic load of the queue in the previous cycle of the third cycle. When the traffic load suddenly drops, the threshold is directly adjusted proportionally, and the threshold can be quickly adjusted to an appropriate level.
  • the network device sets a congestion threshold according to the result of the detection. Specifically, when the result of the detection is YES, the network device increases the congestion threshold after adding the fixed value to a fixed value again. During the startup phase, the congestion threshold is quickly increased and the threshold can be quickly adjusted to an appropriate level.
  • the manner in which the network device sets the congestion threshold according to the result of the detection may be: the network device calculates a comparison threshold according to the average traffic load of the queue in the fourth period, where the second period includes the fourth period, The congestion threshold is set by the comparison threshold and the smaller congestion threshold after increasing the fixed value.
  • the congestion threshold is set according to the comparison threshold, and the fourth period is the subdivision period included in the second period, which can more reflect the real-time control, and when the average traffic load suddenly increases, the waterline is raised to avoid undershoot and the average traffic load is reduced. Lower the waterline and inform the source to slow down as soon as possible to avoid excessive accumulation of queues.
  • the network device calculates the comparison threshold. Specifically, the network device multiplies the average traffic load of the queue in the fourth period by a predetermined value to obtain a comparison threshold. Set the predetermined value according to the actual situation, you can flexibly control the queue cache size and bandwidth utilization.
  • an embodiment of the present application provides a computer storage medium, where the computer storage medium stores computer program instructions, when the computer program instructions are executed by a network device, causing the network device to perform the method described in the first aspect.
  • an embodiment of the present application provides a device, which has a function of implementing network device behavior in an example of the method described in the first aspect.
  • the functions may be implemented by hardware or by corresponding software implemented by hardware.
  • the hardware or software includes one or more units or modules corresponding to the functions described above.
  • a processing module and a transmitting module may be included in the structure of the apparatus, the processing module being configured to support the network device to perform corresponding functions in the method of the first aspect, such as setting a congestion threshold, performing a detecting operation, and performing Calculation operation.
  • the sending module is configured to support communication between a network device and other devices (eg, receiving devices).
  • the device may further include a storage module and a receiving module, the storage module is configured to be coupled with the processing module, and the program module and the data necessary for storing the device, and the receiving module is configured to support the network device and the other device (for example, sending Equipment) communication.
  • the processing module can be a processor
  • the transmitting module can be a transmitter
  • the receiving module can be a receiver
  • the storage module can be a memory.
  • an embodiment of the present application provides a computer program product comprising instructions that, when run on a computer, cause the computer to perform the communication method of the first aspect.
  • the embodiment of the present application provides a network device, where the network device includes a processor and a network interface, where the processor is used by the network device to implement the functions involved in the foregoing first aspect, for example, generating or processing the foregoing method. Data and/or information involved, such as setting congestion thresholds, performing detection operations, and performing computational operations.
  • a network interface is used to support communication between a network device and other devices, such as a receiving device.
  • the network device further includes a memory for holding computer program instructions and data necessary for the network device.
  • FIG. 1 is a schematic structural diagram of a congestion control system disclosed in an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a congestion control method disclosed in an embodiment of the present application.
  • 3A is a schematic diagram of a congestion threshold disclosed in an embodiment of the present application.
  • FIG. 3B is a schematic diagram of a congestion threshold disclosed in another embodiment of the present application.
  • 3C is a schematic diagram of a congestion threshold disclosed in another embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a congestion control method according to another embodiment of the present application.
  • FIG. 5A is a schematic diagram of a congestion threshold disclosed in another embodiment of the present application.
  • FIG. 5B is a schematic diagram of a congestion threshold disclosed in another embodiment of the present application.
  • 6A is a schematic diagram of a congestion threshold disclosed in another embodiment of the present application.
  • 6B is a schematic diagram of a congestion threshold disclosed in another embodiment of the present application.
  • FIG. 7 is a schematic flow chart of a congestion control method according to another embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a network device according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of a network device according to another embodiment of the present application.
  • FIG. 1 is a schematic structural diagram of a congestion control system disclosed in an embodiment of the present application.
  • the congestion control system may include at least a transmitting device 101, at least one network device 102, and a receiving device 103.
  • the sending device 101 sends a packet to the receiving device 103 via the at least one network device 102.
  • the sending device 101 sends the packet to the network device 102.
  • the network device 102 increases the congestion threshold by a fixed value.
  • the network device 102 in the second period, detecting an average traffic load of the queue minus whether the difference of the average traffic load of the queue in the first period is greater than a target increase value, and the network device 102 sets a congestion threshold according to the result of the detection after the end of the second period, When the amount of packets buffered in the queue is greater than the congestion threshold, the network device 102 marks the received packet, and the marked packet is enqueued into the queue, and the marked packet that will be dequeued from the queue is sent.
  • the receiving device 103 notifies the sending device 101 to reduce the message sending rate based on the marked message, and the sending device 101 reduces the message sending rate of sending the message to the network device 102 in response to the notification, thereby reducing the network. congestion.
  • the network device 102 may mark the message by setting the 2-bit ECN field in the header to 11 to indicate that congestion has occurred.
  • the receiving device 103 notifies the sending device 101 to reduce the packet sending rate by using an acknowledgement (ACK) packet, and the ACK packet may be an ECN backhaul (ECE Echo, ECE) in the packet header.
  • the field is set to 1 to indicate that congestion has occurred.
  • the sending device 101 sends a message to the receiving device 103 through a plurality of network devices, if the packet received by the current network device has been marked by the last hop network device, the next hop network device forwards the marked packet. Therefore, when the receiving device 103 receives the marked message, it can be known that the network device is congested on the entire forwarding path.
  • the receiving device 103 may also return an ACK message to the sending device 101 via multiple network devices to notify the sending device 101 to reduce the message sending rate.
  • the network device 102 can be a device such as a switch or a router.
  • the network device 102 can include a processor, at least one queue, and at least one output port. After receiving the message from the sending device 101, the processor in the network device 102 enqueues the message into the queue, and then utilizes the output. The port sends a packet dequeueed from the queue to the receiving device 103.
  • the processor can be a central processing unit (CPU) or a network processor (NP).
  • the queue can be used to cache packets output by the processor.
  • the packets buffered in the queue follow the principle of first-in first-out, and the queue can be implemented by dedicated hardware. Messages dequeued from multiple queues may share an output port to the receiving device 103, and the plurality of queues share the bandwidth of the output port.
  • the traffic load of the queue may be the outgoing rate of the queue, or the ratio of the outgoing rate of the queue to the preset bandwidth of the output port used by the queue in the network device 102.
  • the rate of outgoing queues refers to the rate at which data or packets are output (also referred to as dequeued) from the queue.
  • the average traffic load of the queue refers to the average traffic load of the queues in the period.
  • the network device 102 can calculate the average traffic load of the queue in the following manner. For example, when the traffic load of the queue is the outbound rate of the queue, the average traffic load of the queue can be Is the value obtained by dividing the amount of data or packets output from the queue by the length of the period in a period.
  • the average traffic load of the queue may be a value obtained by dividing the amount of data or packets output from the queue in one cycle by the preset bandwidth of the output port used by the queue and dividing by the length of time of the cycle.
  • the congestion threshold can be used to measure the amount of packets buffered by the queue.
  • the amount of packets buffered by the queue can be the number of packets buffered by the queue or the size of the data cached by the queue. If the number of packets to be queued on the device exceeds the congestion threshold, the number of packets to be dequeued in the queue is too large and the queue is congested.
  • the congestion threshold may have a preset initial value, such as 20,000 bytes.
  • the congestion threshold can be an ECN waterline.
  • the first period may be the previous period of the second period, that is, the first period and the second period are two consecutive periods, and the end time of the first period may be the start time of the second period.
  • the fixed value may also be referred to as a step size, and may be a preset amount of data, for example, an initial step size of 15000 bytes (Bytes), and a step size of 4500 bytes after running for a period of time.
  • the target increase value may be a preset increase amplitude threshold. For example, when the traffic load of the queue is the exit rate of the queue, the target increase value may be 2 gigabits per second (Gbps), when the traffic load of the queue is the queue. When the ratio of the output rate to the preset bandwidth is the target increase value may be 5%.
  • a target reduction value may be defined, the target reduction value may be a preset reduction amplitude threshold, and the target reduction value is less than zero, when the traffic load of the queue is the exit rate of the queue, for example, -12 Gbps, or When the traffic load of the queue is the ratio of the outgoing rate of the queue to the preset bandwidth, for example, -30%.
  • FIG. 2 is a schematic diagram of a congestion control method according to an embodiment of the present disclosure. The method includes, but is not limited to, the following steps:
  • Step S201 The network device increases the congestion threshold by a fixed value after the end of the first period.
  • the network device can adjust the cycle of the queue by 8 cycles, and the congestion threshold of the queue remains unchanged during the first period to the seventh period, and the congestion threshold is increased to a fixed value after the end of the seventh period.
  • the congestion threshold after increasing the fixed value is taken as the congestion threshold of the queue in the 8th cycle.
  • the seventh period may be the first period described in the embodiment of the present application
  • the eighth period may be the second period described in the embodiment of the present application. Taking the schematic diagram of the congestion threshold shown in FIG. 3A as an example, it is assumed that the duration of each period is T1, the first period is 0 to T1, and the seventh period is 6T1 to 7T1. The period is from 7T1 to 8T1.
  • the congestion threshold of the queue is A
  • the fixed value is B
  • the network equipment is at 7T1.
  • the network device can determine that the congestion threshold of the queue may be A+B during the 8th cycle (ie, the period from 7T1 to 8T1).
  • the network device can increase the congestion threshold by a fixed value after the end of the seventh period by using the following formula, where:
  • Th2_next Th2_present+Gap_slow
  • Th2_next represents the congestion threshold of the queue in the 8th cycle
  • Th2_present represents the congestion threshold of the queue in the 7th cycle
  • Gap_slow represents a fixed value.
  • Step S202 The network device detects, in the second period, whether the average traffic load of the queue on the network device minus the difference of the average traffic load of the queue in the first period is greater than the target increase value.
  • the network device After the network device increases the congestion threshold by a fixed value after the end of the seventh period, the average traffic load of the queue in the eighth period can be obtained, and the network device can obtain the average traffic load of the queue in the eighth period. Subtract the difference in the average traffic load of the queue during the 7th cycle, which may be greater than zero or less than zero. The network device detects whether the difference is greater than the target increase value.
  • the network device When the difference is greater than the target increase value, the service load becomes large, and the network device can keep the congestion threshold after increasing the fixed value, and enter the next adjustment cycle; When the difference is less than or equal to the target increase value and not less than the target decrease value (that is, when the traffic load does not exceed the threshold and the traffic load does not become smaller than the threshold), the network device may subtract the congestion threshold after adding the fixed value.
  • a fixed value that is, a fallback threshold before the growth, and the next adjustment cycle.
  • the target increase value is greater than 0, and the target decrease value is less than 0.
  • the network device detects that the average traffic load of the queue in the third period minus the average traffic load of the queue in the last period of the third period is less than the target reduction value, in the third After the end of the period, the congestion threshold is multiplied by the ratio of the average traffic load of the queue in the third period to the average traffic load of the queue in the previous period of the third period.
  • the congestion threshold is multiplied by the ratio of the average traffic load of the queue during the period to the average traffic load of the queue during the previous week of the period. Wherein, the target reduction value is less than zero.
  • the network device can obtain the difference between the average traffic load of the queue in the sixth cycle minus the average traffic load of the queue in the fifth cycle, and the network device detects whether the difference is less than the target reduction value, when the difference is When the value is less than the target decrease value, the network device may multiply the congestion threshold by the ratio of the average traffic load of the queue in the sixth cycle to the average traffic load of the queue in the fifth cycle after the end of the sixth cycle.
  • any of the eight cycles included in one adjustment cycle may be the third cycle in the embodiment of the present application.
  • the network device may multiply the congestion threshold of the queue in the period by the average traffic load of the queue in the period after the period ends.
  • the ratio of the average traffic load of the queue during the previous week of the cycle, the congestion threshold of the queue in the next cycle of the cycle is obtained, and the next cycle of the cycle is taken as the first in the next adjustment cycle of the adjustment cycle. cycle.
  • the network device detects that the average traffic load of the queue on the network device in the second period minus the average traffic load of the queue in the first period is not greater than
  • the target added value is less than the target reduced value, and the network device multiplies the congestion threshold after the fixed value by the end of the second period by the ratio of the average traffic load of the queue in the second period to the average traffic load of the queue in the first period.
  • the network device can multiply the congestion threshold (ie, A) of the queue in the second cycle by the average traffic load of the queue in the second cycle after the end of the second cycle (ie, at 2T1). The ratio of the average traffic load of the queues over a period of one cycle.
  • the network device multiplies the congestion threshold of the queue during the period from T1 to 2T1 by the ratio of the average traffic load of the queue during the period from T1 to 2T1 to the average traffic load of the queue during the period from 0 to T1. As the congestion threshold of the queue during the period from 2T1 to 9T1. Then, the network device can increase the congestion threshold of the queue in the period of 8T1 to 9T1 by a fixed value at the time of 9T1, and obtain the congestion threshold of the queue in the period from 9T1 to 10T1.
  • the network device may multiply the congestion threshold by the ratio of the average traffic load of the queue in the third period to the average traffic load of the queue in the previous period of the third period by using the following formula, where:
  • Th2_next' Th2_present'*Load_present'/Load_farmer'
  • Th2_next' indicates a congestion threshold of the queue in the next cycle of the third cycle
  • Th2_present' indicates a congestion threshold of the queue in the third cycle
  • Load_present' indicates an average traffic load of the queue in the third cycle
  • Load_farmer' indicates The average traffic load of the queue during the last week of the third cycle.
  • Step S203 When the average traffic load of the queue in the second period minus the average traffic load of the queue in the first period is greater than the target increase value, the network device keeps the congestion threshold after increasing the fixed value.
  • the service load becomes larger, and the network device can keep increasing.
  • the congestion threshold after the fixed value is unchanged, and enters the next adjustment loop, which can improve the throughput of the queue and improve the bandwidth utilization.
  • the network device may The congestion threshold after the increase of the fixed value is maintained in the period from 8T1 to 15T1, that is, the congestion threshold of the queue is A+B in the period from 8T1 to 15T1.
  • the network device may also increase the congestion threshold of the queue in the period from 8T1 to 15T1 to a fixed value again at the time of the 15T1, that is, the congestion threshold of the queue is 15+1 to 16T1.
  • the network device can detect whether the average traffic load of the queue during the period from 15T1 to 16T1 minus the average traffic load of the queue during the period from 14T1 to 15T1 is greater than the target increase value, when at 15T1 to 16T1 During the time period, the average traffic load of the queue minus the average traffic load of the queue during the period from 14T1 to 15T1 is greater than the target increase value, and the network device can maintain the queue during the time period from 15T1 to 16T1.
  • the congestion threshold is unchanged; when the average traffic load of the queue during the period from 15T1 to 16T1 minus the average traffic load of the queue during the period from 14T1 to 15T1 is not greater than the target increase value and not less than the target decrease At the time of the value, the network device can subtract the congestion threshold of the queue during the period from 15T1 to 16T1 by a fixed value.
  • Step S204 When the average traffic load of the queue in the second period minus the average traffic load of the queue in the first period is not greater than the target increase value and not less than the target decrease value, the network device will increase the fixed value. The congestion threshold is subtracted from the fixed value.
  • the fixed value is increased.
  • the former congestion threshold is close to a reasonable value (the traffic load does not become large enough after the congestion threshold increases by a fixed value, and the traffic load does not suddenly decrease).
  • the network device can subtract the fixed threshold from the fixed value. And enter the next adjustment loop to reduce the cache pressure of the queue. Taking FIG. 3C as an example, when the average traffic load of the queue in the period from 7T1 to 8T1 minus the average traffic load of the queue in the period from 6T1 to 7T1 is not greater than the target increase value and not less than the target decrease.
  • the network device can subtract the fixed threshold from the congestion threshold after adding a fixed value at the time of 8T1, that is, the congestion threshold of the queue is 8 during the period from 8T1 to 15T1.
  • the network device may also increase the congestion threshold of the queue in the period from 8T1 to 15T1 to a fixed value again at the time of 15T1, that is, the congestion threshold of the queue is A+B in the period from 15T1 to 16T1.
  • the network device can detect whether the average traffic load of the queue during the period from 15T1 to 16T1 minus the average traffic load of the queue during the period from 14T1 to 15T1 is greater than the target increase value, when at 15T1 to 16T1 During the time period, the average traffic load of the queue minus the average traffic load of the queue during the period from 14T1 to 15T1 is greater than the target increase value, and the network device can maintain the queue during the time period from 15T1 to 16T1.
  • the congestion threshold is unchanged; when the average traffic load of the queue during the period from 15T1 to 16T1 minus the average traffic load of the queue during the period from 14T1 to 15T1 is not greater than the target increase value and not less than the target decrease At the time of the value, the network device can subtract the congestion threshold of the queue during the period from 15T1 to 16T1 by a fixed value.
  • Step S205 When the amount of packets buffered in the queue is greater than the congestion threshold, the network device marks the received packet, and enqueues the marked packet into the queue.
  • Step S206 The network device sends the marked message dequeued from the queue to the receiving device.
  • the network device 102 dequeues the packets buffered in the queue.
  • the packets marked in the queue include unmarked packets
  • the unmarked packets are first sent out and sent to the receiver.
  • the device 103, the subsequently marked message is dequeued, and the network device 102 sends the marked message to the receiving device 103.
  • the network device increases the congestion threshold by a fixed value after the end of the first period, and detects the average traffic load of the queue in the second period minus the difference of the average traffic load of the queue in the first period. Whether it is greater than the target increase value, when the result of the detection is YES, the congestion threshold after the increase of the fixed value is kept unchanged; when the result of the detection is no and the difference is not less than the target decrease value, the congestion threshold after the fixed value is increased If the number of packets buffered in the queue is greater than the congestion threshold, the network device marks the received packet and enqueues the marked packet into the queue. The network device dequeues the queue from the queue.
  • the network device dynamically adjusts the congestion threshold according to the change of the traffic load of the queue.
  • the congestion control efficiency is improved.
  • FIG. 4 is a congestion control method according to another embodiment of the present application, where the method includes but is not limited to the following steps:
  • Step S401 The network device increases the congestion threshold by a fixed value after the end of the first period.
  • the network device can increase the congestion threshold of the queue during the adjustment period by a fixed value.
  • the previous one of the two adjacent adjustment periods may correspond to the first period in the embodiment of the present application, and the latter one of the two adjacent adjustment periods may correspond to the second period in the embodiment of the present application.
  • the congestion threshold of the queue in the first period is C
  • the fixed value is D
  • the network device can be at T2.
  • the congestion threshold of the queue in the period from 0 to T2 is increased to a fixed value, that is, the congestion threshold of the queue is C+D in the period from T2 to 2T2.
  • the network device may use the preset initial value as the congestion threshold of the queue in the first period, and increase the congestion threshold by a fixed value after the end of the first period.
  • the first period may be a period from 0 to T2
  • the initial value is C
  • the fixed value is D
  • the congestion threshold of the queue is in the period from 0 to T2.
  • the congestion threshold of the queue during the period from T2 to 2T2 is C+D.
  • the value, the first period, or the second period may be the same or may not be the same, and is not limited by the embodiment of the present application.
  • the network device may increase the congestion threshold by a fixed value after the end of the first period by using the following formula, where:
  • Th2_next Th2_present+Gap_fast
  • Th2_next represents the congestion threshold of the queue in the second period
  • Th2_present represents the congestion threshold of the queue in the first period
  • Gap_fast represents a fixed value
  • Step S402 The network device detects, in the second period, the average traffic load of the queue minus whether the difference of the average traffic load of the queue in the first period is greater than the target increase value.
  • the network device can separately count the average traffic load of the queue in two adjacent adjustment periods. If the average traffic load of the queue increases by more than the target increase value in two adjacent adjustment periods, the network device can be next.
  • the adjustment period continues to increase the congestion threshold based on the fixed value, that is, the congestion threshold after adding the fixed value is again increased to a fixed value; otherwise, the network device can keep the congestion threshold after increasing the fixed value.
  • the target increase value is greater than zero.
  • Step S403 When the average traffic load of the queue in the second period minus the average traffic load of the queue in the first period is greater than the target increase value, the network device increases the congestion threshold after the fixed value by a fixed value again.
  • the network device may increase the congestion threshold of the queue again in the period from T2 to 2T2 at a fixed time of 2T2, that is, at 2T2-3T2
  • the congestion threshold of this queue is C+2D for a period of time.
  • the network device can also obtain the average traffic load of the queue in the period from 2T2 to 3T2 minus the difference of the average traffic load of the queue in the period from T2 to 2T2, and when the difference is greater than the target added value, the network The device can increase the congestion threshold of the queue in the period from 2T2 to 3T2 to a fixed value again at the time of 3T2, that is, the congestion threshold of the queue is C+3D in the period of 3T2-4T2.
  • Step S404 When the average traffic load of the queue in the second period minus the average traffic load of the queue in the first period is not greater than the target increase value, the network device keeps the congestion threshold after increasing the fixed value.
  • the network device After the network device increases the congestion threshold by a fixed value at the time T2, the average traffic load of the queue in the period from T2 to 2T2 can be obtained minus 0 to T2. The difference between the average traffic load of the queues during this time period. When the difference is not greater than the target increase value, the network device may keep the congestion threshold unchanged during the period from 2T2 to 3T2, that is, 2T2 to 3T2.
  • the congestion threshold for this queue during the time period is C+D.
  • Step S405 When the amount of the packets buffered in the queue is greater than the congestion threshold, the network device marks the received packet, and encapsulates the marked packet into the queue.
  • Step S406 The network device sends the marked message dequeued from the queue to the receiving device.
  • Step S406 is similar to step S206, and details are not described herein again.
  • the network device increases the congestion threshold by a fixed value after the end of the first period, and subtracts the average traffic load of the queue during the first period from the average traffic load of the queue during the second period.
  • the network device increases the congestion threshold after adding a fixed value again by a fixed value; when the average traffic load of the queue in the second cycle minus the average traffic load of the queue in the first cycle is less than or equal to the target.
  • the congestion threshold is increased after the fixed value is increased.
  • the network device marks the received packet and enqueues the marked packet into the queue.
  • the network device sends the marked packet dequeued from the queue to the receiving device, and adjusts the congestion threshold to the minimum value that meets the traffic load requirement. This ensures the throughput of the queue, reduces the burst of packets, and reduces the queue.
  • the packet loss rate reduces the device cache pressure.
  • the network device may include a startup phase and an adjustment phase in the process of performing congestion control.
  • the network device may quickly adjust the congestion threshold to the value of the traffic load that is adapted to the queue;
  • the network device dynamically adjusts the congestion threshold to the value of the traffic load of the queue after the change according to the change of the traffic load of the queue.
  • the startup phase can use the method shown in Figure 2.
  • the adjustment phase can use the method shown in Figure 4.
  • the fixed value in the method shown in Figure 4 can be greater than the fixed value in the method shown in Figure 2.
  • the network device is in the startup phase at startup, and the network device can use the initial value as the congestion threshold of the queue during the first adjustment period of the startup phase.
  • the initial value is C
  • the first fixed value of the startup phase is D
  • the network device can use C as the congestion threshold of the queue in the period from 0 to T2.
  • the network device increases the congestion threshold by a first fixed value at the time T2, and the congestion threshold of the queue in the period from T2 to 2T2 is C+D.
  • the network device can separately count the average traffic load of the queue in two adjacent adjustment periods.
  • the network device can be under An adjustment period continues to increase the congestion threshold based on the first fixed value, that is, the congestion threshold after increasing the first fixed value is again increased by the first fixed value; otherwise, the network device can enter the adjustment phase.
  • the duration of any adjustment period is T2.
  • the network device can adjust the cycle with 8 cycles, and the congestion threshold of the queue remains unchanged during the 1st to 7th cycles. After the end of the 7th cycle, the congestion threshold is increased and adjusted.
  • the second fixed value is to increase the congestion threshold after the second fixed value as the congestion threshold of the queue in the eighth period. As shown in FIG. 6A, it is assumed that the second fixed value is B. If the congestion threshold of the queue minus the period from 0 to T2 in the period from T2 to 2T2 is less than the startup phase, the difference between the congestion thresholds of the queue is not greater than the startup phase.
  • the first target increases the value, and the network device can enter the adjustment phase, that is, the congestion threshold (ie, C+D) after the first fixed value is increased during the period from 2T2 to 2T2+7T1.
  • the network device increases the congestion threshold of the queue in the period of 2T2+6T1 to 2T2+7T1 by a second fixed value, that is, the queue in the period of 2T2+7T1 to 2T2+8T1.
  • the congestion threshold is C+D+B.
  • the duration of any one of the adjustment cycles is T1.
  • the network device can acquire the average traffic load of the queue in the 8th cycle minus the 7th.
  • the difference between the average traffic load of the queues in the period the network device detects whether the difference is greater than the second target increase value, and when the difference is greater than the second target increase value, the service load becomes larger, and the network device can maintain the second increase.
  • the congestion threshold after the fixed value is unchanged, and enters the next adjustment cycle; when the difference is less than or equal to the second target increase value and not less than the target decrease value, the network device may decrease the congestion threshold after increasing the second fixed value.
  • the congestion threshold of the queue in the time period from 2T2 to 2T2+7T1 is C+D
  • the congestion threshold of the queue in the period from 2T2+7T1 to 2T2+8T1 is C+D+.
  • the network The device may keep the congestion threshold after the second fixed value is kept in the period from 2T2+8T1 to 2T2+15T1, that is, the congestion threshold of the queue in the period from 2T2+8T1 to 2T2+15T1 is C+D. +B. As shown in FIG.
  • the network device may subtract the second fixed value from the congestion threshold after increasing the second fixed value at the time of 2T2+8T1, that is, at the time of 2T2+8T1 to 2T2+15T1.
  • the congestion threshold of the queue in the segment is C+D.
  • the network device when the average traffic load of the queue drops sharply in any of the eight cycles included in an adjustment cycle, the traffic load suddenly drops, and the network device can be at the end of the cycle.
  • the congestion threshold of the queue during this period is multiplied by the ratio of the average traffic load of the queue during that period to the average traffic load of the queue during the previous week of the period.
  • the network device can detect whether the amount of the buffered packet in the queue is greater than the congestion threshold. When the amount of the buffered packet in the queue is greater than the congestion threshold, the network device can mark the received packet. The tagged message is enqueued into the queue, and the marked message dequeued from the queue is sent to the receiving device to implement congestion control.
  • FIG. 7 is a congestion control method according to another embodiment of the present application, where the method includes but is not limited to the following steps:
  • Step S701 The network device increases the congestion threshold by a fixed value after the end of the first period.
  • Step S702 The network device detects, in the second period, the average traffic load of the queue minus whether the difference of the average traffic load of the queue in the first period is greater than the target increase value.
  • Step S703 The network device sets a congestion threshold according to the result of the detection after the end of the second period.
  • the method for setting the congestion threshold according to the result of the detection may be specifically referred to the description of the embodiment shown in FIG. 2, 4 or 6.
  • the embodiment of the present application is not limited.
  • Step S704 The network device calculates a comparison threshold according to the average traffic load of the queue in the fourth period.
  • the fourth period is a subdivision period included in the second period, and may be a period shorter than the period of the second period, for example, the fourth period is the same as the end time of the second period,
  • the length of the four cycles is one thousandth of the length of the second cycle.
  • the network device may multiply the average traffic load of the queue during the fourth cycle by a predetermined value to obtain a comparison threshold.
  • the comparison threshold reflects the more real-time average traffic load.
  • the network device can obtain a comparison threshold by the following formula, where:
  • Th1 represents a comparison threshold calculated after the end of the fourth period
  • CQ_out represents an average traffic load of the queue in the fourth period
  • Target_Delay represents a predetermined value.
  • the predetermined value is, for example, a target delay, and the predetermined value may be a size specified by the user, and is a configurable value. If the amount of data in the queue cache is small, the delay is small, and the predetermined value may be as close as possible to the no-load. Round-Trip Time (RTT); if the demand is to improve bandwidth utilization and avoid undershoot, the predetermined value can be greater than RTT.
  • RTT refers to the delay experienced in total from the time the transmitting device sends data to the sending device receiving an acknowledgment from the receiving device (the receiving device immediately sends an acknowledgment after receiving the message).
  • Step S705 The network device sets a congestion threshold by using a comparison threshold and a congestion threshold set according to the result of the detection.
  • the network device may compare the comparison threshold with a congestion threshold set according to the result of the detection, and use the comparison threshold and the smallest threshold among the congestion thresholds set according to the detected result as the congestion threshold of the queue in the next period of the second period.
  • Step S706 When the amount of packets buffered in the queue is greater than the congestion threshold, the network device marks the received packet, and encapsulates the marked packet into the queue.
  • Step S707 The network device sends the marked message dequeued from the queue to the receiving device.
  • the network device increases the congestion threshold by a fixed value after the end of the first period, and detects the average traffic load of the queue in the second period minus the difference of the average traffic load of the queue in the first period. Whether the value is greater than the target increase value, and after the second period ends, the congestion threshold is set according to the detection result, and the network device may further calculate a comparison threshold according to the average traffic load of the queue in the fourth period, and compare the threshold and the congestion according to the detection result. The minimum threshold of the threshold is used as the congestion threshold. When the amount of packets buffered in the queue is greater than the congestion threshold, the network device can mark the received packet and enqueue the marked packet into the queue.
  • setting a congestion threshold according to the result of the detection may gradually adjust the congestion threshold according to the average traffic load variation in multiple cycles, and setting a congestion threshold according to the comparison threshold may reflect an average traffic load in a smaller cycle.
  • the congestion threshold set according to the detection result can improve the throughput of the queue and improve the congestion control efficiency when the amount of packets buffered by the queue is small, and the comparison threshold is calculated and compared.
  • the comparison threshold is smaller, according to Comparing thresholds to set the congestion threshold can reflect the real-time control.
  • the source is slowed down as soon as possible to avoid excessive stacking.
  • the congestion threshold is set according to the comparison threshold to be closer to the real-time traffic.
  • FIG. 8 is a schematic structural diagram of a network device according to an embodiment of the present disclosure, which is used to implement the functions of the network device in the embodiments of FIG. 2, 4, 6, and 7.
  • the functional blocks of the network device may be hardware and software. Or a combination of hardware and software to implement the solution of the present application.
  • Those skilled in the art will appreciate that the functional blocks described in FIG. 8 can be combined or separated into several sub-blocks to implement the present application. Accordingly, the above description in this application may support any possible combination or separation or further definition of the functional modules described below.
  • the network device may include: a processing module 801 and a sending module 802, wherein detailed descriptions of the respective modules are as follows.
  • the processing module 801 is configured to: after the end of the first period, increase a congestion threshold by a fixed value, and in an second period, detect an average traffic load of the queue on the network device, and subtract an average traffic of the queue in the first period. Whether the difference of the load is greater than the target increase value, and setting the congestion threshold according to the result of the detection after the end of the second period, where the first period is the previous period of the second period;
  • the processing module 801 is further configured to: when the amount of packets buffered in the queue is greater than the congestion threshold, marking the received packet, and encapsulating the marked packet into the queue, where the marking indication Congestion occurs on the network device;
  • the sending module 802 is configured to send the marked message that is dequeued from the queue to the receiving device.
  • the processing module 801 sets the congestion threshold, including:
  • the processing module 801 sets the congestion threshold, including:
  • the congestion threshold after the fixed value is increased is subtracted from the fixed value.
  • the processing module 801 sets the congestion threshold, including:
  • the congestion threshold after increasing the fixed value is multiplied by the average traffic load of the queue in the second period and the first period The ratio of the average traffic load of the queue.
  • the processing module 801 is further configured to detect that, in the third period, the average traffic load of the queue minus the average traffic load of the queue in the last week of the third period is less than When the target decreases the value, multiplying the congestion threshold by the average traffic load of the queue in the third period and the average of the queue in the previous period of the third period after the end of the third period The ratio of the flow load.
  • the processing module 801 sets the congestion threshold, including:
  • the congestion threshold after increasing the fixed value is increased again by the fixed value.
  • the processing module 801 sets the congestion threshold, including:
  • the congestion threshold is set by using the comparison threshold and the congestion threshold after the addition of the fixed value is smaller.
  • the processing module 801 calculates a comparison threshold, including:
  • the average traffic load of the queue is multiplied by a predetermined value during the fourth period to obtain the comparison threshold.
  • the processing module 801 sets the congestion threshold, including:
  • the congestion threshold is set by using the comparison threshold and the congestion threshold after the addition of the fixed value is smaller.
  • the processing module 801 calculates a comparison threshold, including:
  • the average traffic load of the queue is multiplied by a predetermined value during the second period to obtain the comparison threshold.
  • each module may also correspond to the corresponding description of the embodiment shown in FIG. 2, 4, 6, and 7.
  • the network device shown in FIG. 8 may further include a receiving module, configured to receive a packet from the sending device, and send the received packet to the processing module.
  • a receiving module configured to receive a packet from the sending device, and send the received packet to the processing module.
  • the division of the module in the embodiment of the present application is schematic, and is only a logical function division, and the actual implementation may have another division manner.
  • the functional modules in the embodiments of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • FIG. 9 is a schematic structural diagram of a network device according to an embodiment of the present application.
  • the network device can include at least one processor 901, a bus 902, and a network interface 903.
  • the network device may also include a memory 904.
  • the network device may also include a queue 905, which may be implemented in hardware or in hardware in conjunction with software.
  • the network interface 903, the memory 904, and the processor 901 can be connected to each other through a bus 902.
  • the bus 902 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 9, but it does not mean that there is only one bus or one type of bus.
  • the processor 901 can be a CPU, an NP, a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), and a field programmable gate array (Field Programmable Gate Array). , FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof.
  • the processor 901 is a CPU
  • the CPU may be a single core CPU or a multi-core CPU.
  • the network interface 903 can include an output port for transmitting the marked message to the receiving device.
  • the network interface 903 can also include an input port for receiving messages from the transmitting device.
  • the network device can also separately send and receive messages through different network interfaces 903.
  • the memory 904 can be specifically used to store a congestion threshold or the like, and the memory 904 is, for example, a register. Alternatively, the memory 904 may be included in the processor 901. Queue 905 can be used by the cache processor to send messages from the output port.
  • the network device can also include a memory 906 for storing computer program instructions, and the processor 901 can cause the network device to perform the method of network device execution as shown in Figures 2, 4, 6, and 7 by executing computer program instructions on the memory 906.
  • the processor 901 may be a CPU or an NP.
  • the memory 906 may include a volatile memory such as a random-access memory (RAM); the memory may also include a non-volatile memory such as a read-only memory (read- Only memory, ROM), flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory may also include a combination of the above types of memory.
  • RAM random-access memory
  • ROM read-only memory
  • HDD hard disk drive
  • SSD solid-state drive
  • the processor 901 can directly execute instructions stored in the processor 901, so that the network device performs the method performed by the network device as shown in FIG. 2, 4, 6, and 7. Or when the processor 901 is a combination of NP or NP and an FPGA, the operation is directly performed by an internal hardware circuit (for example, an FPGA circuit), so that the network device performs the method performed by the network device as shown in FIGS. 2, 4, 6, and 7.
  • the processor 901 can implement the functions of the processing module in FIG. 8, and the network interface 903 can implement the functions of the transmitting module in FIG.
  • the components in the network device can perform the following operations:
  • the processor 901 is configured to increase a congestion threshold by a fixed value after the end of the first period, and detect an average traffic load of the queue on the network device in the second period, and subtract the average traffic of the queue in the first period. Whether the difference of the load is greater than the target increase value, and setting the congestion threshold according to the result of the detection after the end of the second period, where the first period is the previous period of the second period;
  • the processor 901 is further configured to: when the amount of the packet buffered in the queue is greater than the congestion threshold, marking the received packet, and encapsulating the marked packet into the queue, where the marking indication Congestion occurs on the network device;
  • the network interface 903 is configured to send the marked message that is dequeued from the queue to the receiving device.
  • the processor 901 sets the congestion threshold, specifically, to:
  • the processor 901 sets the congestion threshold, specifically, to:
  • the congestion threshold after the fixed value is increased is subtracted from the fixed value.
  • the processor 901 sets the congestion threshold, specifically, to:
  • the congestion threshold after increasing the fixed value is multiplied by the average traffic load of the queue in the second period and the first period The ratio of the average traffic load of the queue.
  • the processor 901 is further configured to detect that the average traffic load of the queue in the third period minus the average traffic load of the queue in the previous period of the third period is less than When the target decreases the value, multiplying the congestion threshold by the average traffic load of the queue in the third period and the average of the queue in the previous period of the third period after the end of the third period The ratio of the flow load.
  • the processor 901 sets the congestion threshold, specifically, to:
  • the congestion threshold after increasing the fixed value is increased again by the fixed value.
  • the processor 901 sets the congestion threshold, specifically, to:
  • the congestion threshold is set by using the comparison threshold and the congestion threshold after the addition of the fixed value is smaller.
  • the processor 901 calculates a comparison threshold, specifically for:
  • the average traffic load of the queue is multiplied by a predetermined value during the fourth period to obtain the comparison threshold.
  • the processor 901 sets the congestion threshold, specifically, to:
  • the congestion threshold is set by using the comparison threshold and the congestion threshold after the addition of the fixed value is smaller.
  • the processor 901 calculates a comparison threshold, specifically for:
  • the average traffic load of the queue is multiplied by a predetermined value during the second period to obtain the comparison threshold.
  • the network device is only one example provided by the embodiments of the present application, and that the network device may have more or less components than the components shown, two or more components may be combined, or may have components. Different configurations are implemented.
  • the network device introduced in the embodiment of the present application may be used to implement some or all of the processes in the method embodiments introduced in conjunction with FIG. 2-7.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center via wired (eg, coaxial cable, fiber optic, digital subscriber line) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请实施例公开了拥塞控制方法及网络设备,其中,所述方法包括:网络设备在第一周期结束后将拥塞阈值增加固定值,在第二周期内检测网络设备上队列的平均流量负载减去在第一周期内所述队列的平均流量负载的差值是否大于目标增加值,并在第二周期结束后根据检测的结果设置拥塞阈值,第一周期是第二周期的上一周期;当队列中缓存的报文量大于拥塞阈值时,网络设备对接收的报文进行标记,将标记后的报文入队所述队列;网络设备将从队列出队的标记后的报文发送给接收设备。采用本申请实施例,可基于队列的流量负载,自动设置该队列的拥塞阈值,在确保队列缓存的报文量较小的情况下,提升队列的吞吐量,提高拥塞控制效率。

Description

拥塞控制方法及网络设备 技术领域
本申请涉及通信技术领域,尤其涉及拥塞控制方法及网络设备。
背景技术
显式拥塞通告(Explicit Congestion Notification,ECN)是一种拥塞控制技术,即用户在网络设备的队列上手动配置拥塞阈值,当该队列中缓存的报文量大于拥塞阈值时,网络设备可以对出该队列的报文进行标记,并将标记后的报文发送给接收设备;接收设备在接收到标记后的报文之后,可以通知发送设备减小报文发送速率,以达到减轻网络设备拥塞的目的。目前,在现有网络设备上,ECN的实现是一种静态固定的方法,需要用户手动配置一个固定不变的拥塞阈值。但是随着业务流量模型的动态变化,固定不变的拥塞阈值并不能适应多样化的需求。拥塞阈值较高,队列缓存的报文量较大,对网络设备的缓存能力要求较高,报文的往返时延(Round-Trip Time,RTT)较长;拥塞阈值较低,队列的吞吐量较低,带宽利用率较低。基于此,如何配置合适的拥塞阈值,以满足业务流量模型的多样化需求是当前亟需解决的技术问题。
发明内容
本申请实施例所要解决的技术问题在于,提供拥塞控制方法及网络设备,可基于队列的流量负载,自动设置该队列的拥塞阈值,在确保队列缓存的报文量较小的情况下,提升队列的吞吐量,提高拥塞控制效率。
第一方面,本申请实施例提供了一种拥塞控制方法,网络设备可以在第一周期结束后将拥塞阈值增加固定值,然后在第二周期内检测网络设备上队列的平均流量负载减去在第一周期内队列的平均流量负载的差值是否大于目标增加值,并在第二周期结束后根据检测的结果设置拥塞阈值,第一周期是第二周期的上一周期。当队列中缓存的报文量大于拥塞阈值时,网络设备对接收的报文进行标记,将标记后的报文入队该队列,标记指示网络设备上发生拥塞,网络设备可以将从队列出队的标记后的报文发送给接收设备。
在该技术方案中,网络设备可以在增大拥塞阈值之后,检测增大拥塞阈值之后队列的平均流量负载减去增大拥塞阈值之前队列的平均流量负载的差值是否大于目标增加值,进而根据检测的结果设置拥塞阈值,可实现基于队列的流量负载,自动设置该队列的拥塞阈值,在确保队列缓存的报文量较小的情况下,提升队列的吞吐量,提高拥塞控制效率。
在一个可行的实施例中,网络设备根据检测的结果设置拥塞阈值,具体可以为:当检测的结果为是时,网络设备保持增加固定值后的拥塞阈值不变。平均流量负载增长超过目标值,增加后的阈值相较于增加前的阈值是更适合的阈值。
在一个可行的实施例中,网络设备根据检测的结果设置拥塞阈值,具体可以为:当检测的结果为否且差值不小于目标减小值时,网络设备将增加固定值后的拥塞阈值减去固定值。平均流量负载增长没有超过目标值,水线不需要提升,增加前的阈值是更适合的阈值。
在一个可行的实施例中,网络设备根据检测的结果设置拥塞阈值,具体可以为:当所述检测的结果为否且所述差值小于目标减小值时,所述网络设备将增加固定值后的拥塞阈值乘以所述第二周期内所述队列的平均流量负载与所述第一周期内所述队列的平均流量负载的比值。业务负载突然下降时,直接按比例调整阈值,可以快速将阈值调整到合适水平。
在一个可行的实施例中,网络设备检测到在第三周期内队列的平均流量负载减去第三周期的上一周期内队列的平均流量负载的差值小于目标减小值时,可以在第三周期结束后将拥塞阈值乘以第三周期内队列的平均流量负载与第三周期的上一周期内队列的平均流量负载的比值。业务负载突然下降时,直接按比例调整阈值,可以快速将阈值调整到合适水平。
在一个可行的实施例中,网络设备根据检测的结果设置拥塞阈值,具体可以为:当检测的结果为是时,网络设备将增加固定值后的拥塞阈值再次增加固定值。启动阶段,快速增加拥塞阈值,可以快速将阈值调整到合适水平。
在一个可行的实施例中,网络设备根据检测的结果设置拥塞阈值的方式还可以为:网络设备根据在第四周期内队列的平均流量负载,计算比较阈值,第二周期包括该第四周期,用比较阈值和增加固定值后的拥塞阈值较小者设置拥塞阈值。根据比较阈值设置拥塞阈值,第四周期是包括在第二周期中的细分周期,能更加反映控制的实时性,平均流量负载突然增加时提升水线,避免欠吞吐,平均流量负载降低时,降低水线,尽快通知源端降速,避免队列过度堆积。
在一个可行的实施例中,网络设备计算比较阈值,具体可以为:网络设备将在第四周期内队列的平均流量负载与预定值相乘,得到比较阈值。根据实际情况设置预定值,可以灵活控制队列缓存大小和带宽利用率。
第二方面,本申请实施例提供一种计算机存储介质,所述计算机存储介质存储有计算机程序指令,所述计算机程序指令被网络设备执行时,使得网络设备执行第一方面所述的方法。
第三方面,本申请实施例提供一种装置,该装置具有实现第一方面所述的方法示例中网络设备行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的单元或模块。
在一个设计方案中,装置的结构中可包括处理模块和发送模块,所述处理模块被配置为支持网络设备执行第一方面所述方法中相应的功能,例如设置拥塞阈值、执行检测操作和执行计算操作。所述发送模块用于支持网络设备与其他设备(例如接收设备)之间的通信。所述装置还可以包括存储模块和接收模块,所述存储模块用于与处理模块耦合,其保存装置必要的程序指令和数据,所述接收模块用于支持网络设备与其他设备之间(例如发送设备)的通信。作为示例,处理模块可以为处理器,发送模块可以为发射器,接收模块可以为接收器,存储模块可以为存储器。
第四方面,本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行第一方面所述的通信方法。
第五方面,本申请实施例提供了一种网络设备,该网络设备包括处理器和网络接口,处理器用于网络设备实现上述第一方面中所涉及的功能,例如,生成或处理上述方法中所涉及的数据和/或信息,例如设置拥塞阈值、执行检测操作和执行计算操作。网络接口用于支持网络设备与其他设备(例如接收设备)之间的通信。
在一个设计方案中,所述网络设备还包括存储器,所述存储器,用于保存网络设备必要的计算机程序指令和数据。
附图说明
为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中使用的附图进行说明。
图1是本申请实施例公开的一种拥塞控制系统的架构示意图;
图2是本申请实施例公开的一种拥塞控制方法的流程示意图;
图3A是本申请实施例公开的一种拥塞阈值的示意图;
图3B是本申请另一实施例公开的一种拥塞阈值的示意图;
图3C是本申请另一实施例公开的一种拥塞阈值的示意图;
图4是本申请另一实施例公开的一种拥塞控制方法的流程示意图;
图5A是本申请另一实施例公开的一种拥塞阈值的示意图;
图5B是本申请另一实施例公开的一种拥塞阈值的示意图;
图6A是本申请另一实施例公开的一种拥塞阈值的示意图;
图6B是本申请另一实施例公开的一种拥塞阈值的示意图;
图7是本申请另一实施例公开的一种拥塞控制方法的流程示意图;
图8是本申请实施例公开的一种网络设备的结构示意图;
图9是本申请另一实施例公开的一种网络设备的结构示意图。
具体实施方式
下面结合本申请实施例中的附图对本申请实施例进行描述。
为了更好的理解本申请实施例公开的一种拥塞控制方法及网络设备,下面首先对本申请实施例适用的网络架构进行描述。请参见图1,图1是本申请实施例公开的一种拥塞控制系统的架构示意图。如图1所示,该拥塞控制系统可以至少包括发送设备101、至少一个网络设备102以及接收设备103。其中,发送设备101经至少一个网络设备102向接收设备103发送报文,例如发送设备101将报文发送给网络设备102,网络设备102在第一周期结束后将拥塞阈值增加固定值,网络设备102在第二周期内检测队列的平均流量负载减去在第一周期内队列的平均流量负载的差值是否大于目标增加值,网络设备102在第二周期结束后根据检测的结果设置拥塞阈值,当队列中缓存的报文量大于拥塞阈值时,网络设备102对接收的报文进行标记,将标记后的报文入队所述队列,将从所述队列出队的标记后的报 文发送给接收设备103,接收设备103基于标记后的报文通知发送设备101减小报文发送速率,发送设备101响应该通知降低向网络设备102发送报文的报文发送速率,由此降低网络拥塞。
举例来说,网络设备102对报文进行标记可以是将报文头中的2比特ECN字段置为11,以表示发生拥塞。在该例子中,接收设备103通知发送设备101减小报文发送速率可以利用确认(acknowledgement,ACK)报文,ACK报文中可以是将报文头中的ECN回传(ECN Echo,ECE)字段置为1,以表示发生拥塞。当发送设备101经过多个网络设备向接收设备103发送报文时,如果当前网络设备接收的报文已经被上一跳网络设备标记过,则向下一跳网络设备转发标记过的报文,由此接收设备103接收到标记过的报文时可以知晓整个转发路径上有网络设备发生拥塞。当发送设备101和接收设备103之间存在多个网络设备时,接收设备103也可以经多个网络设备向发送设备101返回ACK报文以便通知发送设备101减小报文发送速率。
其中,网络设备102可以为交换机或路由器等设备。网络设备102可以包括处理器、至少一个队列和至少一个输出端口,网络设备102中的处理器接收到来自发送设备101的报文后,将报文入队(enqueue)到队列中,随后利用输出端口将从队列中出队(dequeue)的报文发送给接收设备103。处理器可以是中央处理器(central processing unit,CPU)或是网络处理器(network processor,NP)。队列可以用于缓存处理器输出的报文,队列中缓存的报文遵循先入先出原则,队列可以由专用硬件实现。从多个队列出队的报文可以共用一个输出端口向接收设备103发送,该多个队列共享该输出端口的带宽。
其中,队列的流量负载可以是该队列的出速率,也可以是该队列的出速率与该网络设备102中该队列使用的输出端口的预设带宽的比值等。队列的出速率指的是从该队列输出(也可称为出队)数据或报文的速率。队列的平均流量负载指的是周期内队列的流量负载的平均值,网络设备102可以以如下方法计算队列的平均流量负载,例如队列的流量负载是队列的出速率时,队列的平均流量负载可以是一个周期内从队列输出的数据量或报文量除以该周期的时间长度得到的值,例如队列的流量负载是队列的出速率与该队列使用的输出端口的预设带宽的比值时,队列的平均流量负载可以是将一个周期内从队列输出的数据量或报文量除以该队列使用的输出端口的预设带宽再除以该周期的时间长度得到的值。
其中,拥塞阈值可以用于衡量队列缓存的报文量,队列缓存的报文量可以是队列缓存报文的数量,或是队列缓存的数据的大小。当设备上一队列缓存的报文量超过拥塞阈值时,表示设备上该队列中待出队的报文过多,队列发生拥塞。拥塞阈值可以具有预设的初始值,例如20000字节。示例性的,拥塞阈值可以为ECN水线。
其中,第一周期可以是第二周期的上一周期,即第一周期和第二周期是连续的两个周期,第一周期的结束时间可以为第二周期的起始时间。
其中,固定值也可以称为步长,可以为预先设定的数据量,例如初始时步长15000字节(Bytes),运行一段时间后步长4500字节。目标增加值可以为预先设定的增长幅度门限,例如当队列的流量负载是该队列的出速率时,目标增加值可以是2吉比特每秒(Gbps),当队列的流量负载是该队列的出速率与所述预设带宽的比值时,目标增加值可以是5%。类似地,可以定义目标减小值,目标减小值可以为预先设定的降低幅度门限,目标减小值小于零,当队列的流量负载是该队列的出速率时,例如是-12Gbps,或者当队列的流量负载是 该队列的出速率与所述预设带宽的比值时,例如是-30%。
基于图1所示的拥塞控制系统的架构示意图,请参见图2,图2是本申请实施例提供的一种拥塞控制方法,该方法包括但不限于如下步骤:
步骤S201:网络设备在第一周期结束后将拥塞阈值增加固定值。
举例来说,网络设备可以以8个周期为一个调整循环,在第1个周期至第7个周期内队列的拥塞阈值保持不变,在第7个周期结束后将上述拥塞阈值增加固定值,将增加固定值后的拥塞阈值作为在第8个周期内该队列的拥塞阈值。示例性的,第7个周期可以为本申请实施例中描述的第一周期,第8个周期可以为本申请实施例中描述的第二周期。以图3A所示的拥塞阈值的示意图为例,假设每个周期的时长为T1,第1个周期为0至T1这一时间段,第7个周期为6T1至7T1这一时间段,第8个周期为7T1至8T1这一时间段,在第1个周期至第7个周期(即0至7T1这一时间段)内队列的拥塞阈值为A,固定值为B,网络设备在7T1这一时刻将拥塞阈值增加固定值,则网络设备可以确定在第8个周期(即7T1至8T1这一时间段)内该队列的拥塞阈值可以为A+B。
示例性的,网络设备可以通过如下公式在第7个周期结束后将拥塞阈值增加固定值,其中:
Th2_next=Th2_present+Gap_slow
其中,Th2_next表示在第8个周期内队列的拥塞阈值,Th2_present表示在第7个周期内队列的拥塞阈值,Gap_slow表示固定值。
步骤S202:网络设备在第二周期内检测网络设备上队列的平均流量负载减去在第一周期内队列的平均流量负载的差值是否大于目标增加值。
举例来说,网络设备在第7个周期结束后将拥塞阈值增加固定值之后,可以获取在第8个周期内队列的平均流量负载,网络设备可以获取在第8个周期内队列的平均流量负载减去在第7个周期内队列的平均流量负载的差值,该差值可能大于零也可能小于零。网络设备检测该差值是否大于目标增加值,当该差值大于目标增加值时,说明业务负载变大,网络设备可以保持增加固定值后的拥塞阈值不变,并进入下一个调整循环;当该差值小于等于目标增加值且不小于目标减小值(即业务负载变大没有超过阈值,且业务负载也没有变小超过阈值)时,网络设备可以将增加固定值后的拥塞阈值减去固定值,即回退到增长之前的拥塞阈值,并进入下一个调整循环。其中,目标增加值大于0,目标减小值小于0。
在一个可行的实施例中,网络设备检测到在第三周期内队列的平均流量负载减去第三周期的上一周期内队列的平均流量负载的差值小于目标减小值时,在第三周期结束后将拥塞阈值乘以第三周期内队列的平均流量负载与第三周期的上一周期内队列的平均流量负载的比值。
举例来说,当在一个调整循环所包含的8个周期中,任意周期内队列的平均流量负载出现大幅下降时,说明业务负载突然下降,网络设备可以在该周期结束后将在该周期内队列的拥塞阈值乘以该周期内队列的平均流量负载与该周期的上一周期内队列的平均流量负载的比值。其中,目标减小值小于0。例如,网络设备可以获取在第6个周期内队列的平均流量负载减去在第5个周期内队列的平均流量负载的差值,网络设备检测该差值是否小于目标减小值,当该差值小于目标减小值时,网络设备可以在第6个周期结束后将拥塞阈值乘以第6个周期内队列的平均流量负载与第5个周期内队列的平均流量负载的比值。示例 性的,一个调整循环所包含的8个周期中的任意周期可以为本申请实施例中的第三周期。示例性的,一个调整循环中任意周期内队列的平均流量负载出现大幅下降时,网络设备可以在该周期结束后将在该周期内队列的拥塞阈值乘以该周期内队列的平均流量负载与该周期的上一周期内队列的平均流量负载的比值,得到在该周期的下一周期内队列的拥塞阈值,并将该周期的下一周期作为上述调整循环的下一个调整循环中的第1个周期。当前述第二周期内队列的平均流量负载出现大幅下降时,网络设备上检测到第二周期内网络设备上队列的平均流量负载减去在第一周期内队列的平均流量负载的差值不大于目标增加值且小于目标减小值,则网络设备在第二周期结束后将增加固定值后的拥塞阈值乘以第二周期内队列的平均流量负载与第一周期内队列的平均流量负载的比值。
以图3B所示的拥塞阈值的示意图为例,当在T1至2T1这一时间段内队列的平均流量负载减去在0至T1这一时间段内队列的平均流量负载的差值小于目标减小值时,网络设备可以在第2个周期结束后(即2T1这一时刻)将在第2个周期内队列的拥塞阈值(即A)乘以第2个周期内队列的平均流量负载与第1个周期内队列的平均流量负载的比值。网络设备将在T1至2T1这一时间段内队列的拥塞阈值乘以在T1至2T1这一时间段内队列的平均流量负载与在0至T1这一时间段内队列的平均流量负载的比值,作为在2T1至9T1这一时间段内队列的拥塞阈值。然后,网络设备可以在9T1这一时刻将在8T1至9T1这一时间段内队列的拥塞阈值增加固定值,得到在9T1至10T1这一时间段内队列的拥塞阈值。
示例性的,网络设备可以通过如下公式将拥塞阈值乘以第三周期内队列的平均流量负载与第三周期的上一周期内队列的平均流量负载的比值,其中:
Th2_next′=Th2_present′*Load_present′/Load_farmer′
其中,Th2_next′表示在第三周期的下一周期内队列的拥塞阈值,Th2_present′表示在第三周期内队列的拥塞阈值,Load_present′表示在第三周期内队列的平均流量负载,Load_farmer′表示在第三周期的上一周期内队列的平均流量负载。
步骤S203:当在第二周期内队列的平均流量负载减去在第一周期内队列的平均流量负载的差值大于目标增加值时,网络设备保持增加固定值后的拥塞阈值不变。
举例来说,当在第8个周期内队列的平均流量负载减去在第7个周期内队列的平均流量负载的差值大于目标增加值时,说明业务负载变大了,网络设备可以保持增加固定值后的拥塞阈值不变,并进入下一个调整循环,可提升该队列的吞吐量,提高宽带利用率。以图3A为例,当在7T1至8T1这一时间段内队列的平均流量负载减去在6T1至7T1这一时间段内队列的平均流量负载的差值大于目标增加值时,网络设备可以在8T1至15T1这一时间段内保持增加固定值后的拥塞阈值不变,即在8T1至15T1这一时间段内队列的拥塞阈值为A+B。网络设备还可以在第15T1这一时刻将在8T1至15T1这一时间段内队列的拥塞阈值再次增加固定值,即在15T1至16T1这一时间段内队列的拥塞阈值为A+2B。然后,网络设备可以检测在15T1至16T1这一时间段内队列的平均流量负载减去在14T1至15T1这一时间段内队列的平均流量负载的差值是否大于目标增加值,当在15T1至16T1这一时间段内队列的平均流量负载减去在14T1至15T1这一时间段内队列的平均流量负载的差值大于目标增加值时,网络设备可以保持在15T1至16T1这一时间段内队列的拥塞阈值不变;当在15T1至16T1这一时间段内队列的平均流量负载减去在14T1至15T1这一时间段内队列的平均流量负载的差值不大于目标增加值且不小于目标减小值时,网络设备可以将在15T1至16T1 这一时间段内队列的拥塞阈值减去固定值。
步骤S204:当在第二周期内队列的平均流量负载减去在第一周期内队列的平均流量负载的差值不大于目标增加值且不小于目标减小值时,网络设备将增加固定值后的拥塞阈值减去固定值。
举例来说,当在第8个周期内队列的平均流量负载减去在第7个周期内队列的平均流量负载的差值不大于目标增加值且不小于目标减小值时,说明增加固定值前的拥塞阈值已经接近合理值(拥塞阈值增加固定值后,业务负载并没有变得足够大,且业务负载也没有突然变小),网络设备可以将增加固定值后的拥塞阈值减去固定值,并进入下一个调整循环,可减小队列的缓存压力。以图3C为例,当在7T1至8T1这一时间段内队列的平均流量负载减去在6T1至7T1这一时间段内队列的平均流量负载的差值不大于目标增加值且不小于目标减小值时,网络设备可以在8T1这一时刻将增加固定值后的拥塞阈值减去固定值,即在8T1至15T1这一时间段内队列的拥塞阈值为A。网络设备还可以在15T1这一时刻将在8T1至15T1这一时间段内队列的拥塞阈值再次增加固定值,即在15T1至16T1这一时间段内队列的拥塞阈值为A+B。然后,网络设备可以检测在15T1至16T1这一时间段内队列的平均流量负载减去在14T1至15T1这一时间段内队列的平均流量负载的差值是否大于目标增加值,当在15T1至16T1这一时间段内队列的平均流量负载减去在14T1至15T1这一时间段内队列的平均流量负载的差值大于目标增加值时,网络设备可以保持在15T1至16T1这一时间段内队列的拥塞阈值不变;当在15T1至16T1这一时间段内队列的平均流量负载减去在14T1至15T1这一时间段内队列的平均流量负载的差值不大于目标增加值且不小于目标减小值时,网络设备可以将在15T1至16T1这一时间段内队列的拥塞阈值减去固定值。
步骤S205:当队列中缓存的报文量大于拥塞阈值时,网络设备对接收的报文进行标记,将标记后的报文入队该队列。
步骤S206:网络设备将从队列出队的标记后的报文发送给接收设备。
以图1为例,网络设备102将队列中缓存的报文出队,当队列中标记后的报文前包括未标记的报文时,未标记的报文先出队,并被发往接收设备103,随后标记后的报文出队,网络设备102将标记后的报文发送给接收设备103。
在图2所描述的方法中,网络设备在第一周期结束后将拥塞阈值增加固定值,在第二周期内检测队列的平均流量负载减去在第一周期内队列的平均流量负载的差值是否大于目标增加值,当检测的结果为是时,保持增加固定值后的拥塞阈值不变;当检测的结果为否且差值不小于目标减小值时,将增加固定值后的拥塞阈值减去固定值,当队列中缓存的报文量大于拥塞阈值时,网络设备对接收的报文进行标记,并将标记后的报文入队该队列,网络设备将从队列出队的标记后的报文发送给接收设备,网络设备可根据队列的流量负载的变化,动态调整拥塞阈值,在确保队列缓存的报文量较小的情况下,提升队列的吞吐量,提高拥塞控制效率。
请参见图4,图4是本申请另一实施例提供的一种拥塞控制方法,该方法包括但不限于如下步骤:
步骤S401:网络设备在第一周期结束后将拥塞阈值增加固定值。
举例来说,每经过一个调整周期,网络设备可以将在该调整周期内队列的拥塞阈值增加固定值。示例性的,两个相邻调整周期中前一个调整周期可以对应本申请实施例中的第 一周期,两个相邻调整周期中后一个调整周期可以对应本申请实施例中的第二周期。以图5A所示的拥塞阈值的示意图为例,假设第一周期为0至T2这一时间段,在第一周期内队列的拥塞阈值为C,固定值为D,网络设备可以在T2这一时刻将0至T2这一时间段内队列的拥塞阈值增加固定值,即在T2至2T2这一时间段内队列的拥塞阈值为C+D。
在一个可行的实施例中,在网络设备启动后,网络设备可以将预设的初始值作为在第一周期内队列的拥塞阈值,在第一周期结束后将拥塞阈值增加固定值。以图5A所示的拥塞阈值的示意图为例,第一周期可以为0至T2这一时间段,初始值为C,固定值为D,则在0至T2这一时间段内队列的拥塞阈值为C,在T2至2T2这一时间段内队列的拥塞阈值为C+D。
需要说明的是,本申请实施例中的固定值、目标增加值、目标减小值、第一周期或者第二周期分别和图2所示实施例中的固定值、目标增加值、目标减小值、第一周期或者第二周期可以对应相同,也可以对应不相同,具体不受本申请实施例的限定。
示例性的,网络设备可以通过如下公式在第一周期结束后将拥塞阈值增加固定值,其中:
Th2_next=Th2_present+Gap_fast
其中,Th2_next表示在第二周期内队列的拥塞阈值,Th2_present表示在第一周期内队列的拥塞阈值,Gap_fast表示固定值。
步骤S402:网络设备在第二周期内检测队列的平均流量负载减去在第一周期内队列的平均流量负载的差值是否大于目标增加值。
举例来说,网络设备可以分别统计在两个相邻调整周期内队列的平均流量负载,如果在两个相邻调整周期内队列的平均流量负载的增长幅度超过目标增加值,网络设备可以在下一个调整周期继续基于固定值提升拥塞阈值,即将增加固定值后的拥塞阈值再次增加固定值;否则,网络设备可以保持增加固定值后的拥塞阈值不变。其中,目标增加值大于0。
步骤S403:当在第二周期内队列的平均流量负载减去在第一周期内队列的平均流量负载的差值大于目标增加值时,网络设备将增加固定值后的拥塞阈值再次增加固定值。
以图5A为例,网络设备在T2这一时刻将拥塞阈值增加固定值之后,可以获取在T2至2T2这一时间段内队列的平均流量负载减去在0至T2这一时间段内队列的平均流量负载的差值,当该差值大于目标增加值时,网络设备可以在2T2这一时刻将在T2至2T2这一时间段内队列的拥塞阈值再次增加固定值,即在2T2-3T2这一时间段内该队列的拥塞阈值为C+2D。网络设备还可以获取在2T2至3T2这一时间段内队列的平均流量负载减去在T2至2T2这一时间段内队列的平均流量负载的差值,当该差值大于目标增加值时,网络设备可以在3T2这一时刻将在2T2至3T2这一时间段内队列的拥塞阈值再次增加固定值,即在3T2-4T2这一时间段内该队列的拥塞阈值为C+3D。
步骤S404:当在第二周期内队列的平均流量负载减去在第一周期内队列的平均流量负载的差值不大于目标增加值时,网络设备保持增加固定值后的拥塞阈值不变。
以图5B所示的拥塞阈值的示意图为例,网络设备在T2这一时刻将拥塞阈值增加固定值之后,可以获取在T2至2T2这一时间段内队列的平均流量负载减去在0至T2这一时间段内队列的平均流量负载的差值,当该差值不大于目标增加值时,网络设备可以在2T2至3T2这一时间段内保持拥塞阈值不变,即在2T2至3T2这一时间段内该队列的拥塞阈值为C+D。
步骤S405:当队列中缓存的报文量大于拥塞阈值时,网络设备对接收的报文进行标记,将标记后的报文入队该队列。
步骤S406:网络设备将从队列出队的标记后的报文发送给接收设备。
步骤S406与步骤S206类似,在此不再赘述。
在图4所描述的方法中,网络设备在第一周期结束后将拥塞阈值增加固定值,当在第二周期内队列的平均流量负载减去在第一周期内队列的平均流量负载的差值大于目标增加值时,网络设备将增加固定值后的拥塞阈值再次增加固定值;当在第二周期内队列的平均流量负载减去在第一周期内队列的平均流量负载的差值小于等于目标增加值时,保持增加固定值后的拥塞阈值不变,当队列中缓存的报文量大于拥塞阈值时,网络设备对接收的报文进行标记,并将标记后的报文入队该队列,网络设备将从队列出队的标记后的报文发送给接收设备,可将拥塞阈值调整到恰好满足流量负载需求的最小值,既保证队列的吞吐量,又降低报文突发,降低队列的丢包率,减小设备缓存压力。
以图6A、6B为例,网络设备在进行拥塞控制的过程中可以包括启动阶段和调整阶段,在启动阶段,网络设备可快速将拥塞阈值调整到适应队列的流量负载的数值;在调整阶段,网络设备可根据队列的流量负载的变化,将拥塞阈值动态调整到适应变化后的该队列的流量负载的数值。启动阶段可以使用图2所示方法,调整阶段可以使用图4所示方法,图4所示方法中的固定值可以大于图2所示方法中的固定值。
网络设备在启动时处于启动阶段,网络设备可以将初始值作为在启动阶段的第1个调整周期内队列的拥塞阈值。如图6A所示,假设初始值为C,启动阶段的第一固定值为D,网络设备可以将C作为在0至T2这一时间段内队列的拥塞阈值。网络设备在T2这一时刻将拥塞阈值增加第一固定值,则T2至2T2这一时间段内队列的拥塞阈值为C+D。网络设备可以分别统计在两个相邻调整周期内队列的平均流量负载,如果在两个相邻调整周期内队列的平均流量负载的增长幅度超过启动阶段的第一目标增加值,网络设备可以在下一个调整周期继续基于第一固定值提升拥塞阈值,即将增加第一固定值后的拥塞阈值再次增加第一固定值;否则,网络设备可以进入调整阶段。其中,任一调整周期的时长为T2。
在调整阶段,网络设备可以以8个周期为一个调整循环,在第1个周期至第7个周期内队列的拥塞阈值保持不变,在第7个周期结束后将上述拥塞阈值增加调整阶段的第二固定值,将增加第二固定值后的拥塞阈值作为在第8个周期内该队列的拥塞阈值。如图6A所示,假设第二固定值为B,如果在T2至2T2这一时间段内队列的拥塞阈值减去在0至T2这一时间段内队列的拥塞阈值的差值不大于启动阶段的第一目标增加值,网络设备可以进入调整阶段,即在2T2至2T2+7T1这一时间段内保持增加第一固定值后的拥塞阈值(即C+D)不变。然后,网络设备在2T2+7T1这一时刻将在2T2+6T1至2T2+7T1这一时间段内队列的拥塞阈值增加第二固定值,即在2T2+7T1至2T2+8T1这一时间段内队列的拥塞阈值为C+D+B。其中,一个调整循环中任一周期的时长为T1。
进一步的,当在第8个周期内队列的平均流量负载大于在第7个周期内队列的平均流量负载时,网络设备可以获取在第8个周期内队列的平均流量负载减去在第7个周期内队列的平均流量负载的差值,网络设备检测该差值是否大于第二目标增加值,当该差值大于第二目标增加值时,说明业务负载变大,网络设备可以保持增加第二固定值后的拥塞阈值 不变,并进入下一个调整循环;当该差值小于等于第二目标增加值且不小于目标减小值时,网络设备可以将增加第二固定值后的拥塞阈值减去第二固定值,即回退到增长之前的拥塞阈值,并进入下一个调整循环。如图6A所示,网络设备在2T2至2T2+7T1这一时间段内队列的拥塞阈值为C+D,在2T2+7T1至2T2+8T1这一时间段内队列的拥塞阈值为C+D+B,如果在2T2+7T1至2T2+8T1这一时间段内队列的平均流量负载减去在2T2至2T2+7T1这一时间段内队列的平均流量负载的差值大于第二目标增加值,网络设备可以在2T2+8T1至2T2+15T1这一时间段内保持增加第二固定值后的拥塞阈值不变,即在2T2+8T1至2T2+15T1这一时间段内队列的拥塞阈值为C+D+B。如图6B所示,如果在2T2+7T1至2T2+8T1这一时间段内队列的平均流量负载减去在2T2至2T2+7T1这一时间段内队列的平均流量负载的差值不大于第二目标增加值且不小于目标减小值,网络设备可以在2T2+8T1这一时刻将增加第二固定值后的拥塞阈值减去第二固定值,即在2T2+8T1至2T2+15T1这一时间段内队列的拥塞阈值为C+D。
在一个可行的实施例中,当在一个调整循环所包含的8个周期中,任意周期内队列的平均流量负载出现大幅下降时,说明业务负载突然下降,网络设备可以在该周期结束后将在该周期内队列的拥塞阈值乘以该周期内队列的平均流量负载与该周期的上一周期内队列的平均流量负载的比值。
进一步的,网络设备通过上述方式设置拥塞阈值之后,可以检测队列中缓存的报文量是否大于拥塞阈值,当队列中缓存的报文量大于拥塞阈值时,网络设备可以对接收的报文进行标记,将标记后的报文入队该队列,并将从队列出队的标记后的报文发送给接收设备,以实现拥塞控制。
请参见图7,图7是本申请另一实施例提供的一种拥塞控制方法,该方法包括但不限于如下步骤:
步骤S701:网络设备在第一周期结束后将拥塞阈值增加固定值。
步骤S702:网络设备在第二周期内检测队列的平均流量负载减去在第一周期内队列的平均流量负载的差值是否大于目标增加值。
步骤S703:网络设备在第二周期结束后根据检测的结果设置拥塞阈值。
需要说明的是,本申请实施例中根据检测的结果设置拥塞阈值的方法具体可以参考图2、4或者6所示实施例的描述,本申请实施例不作限定。
步骤S704:网络设备根据在第四周期内队列的平均流量负载,计算比较阈值。
在一个可行的实施例中,第四周期是包括在第二周期中的一个细分周期,可以是比第二周期的周期更短的周期,例如第四周期与第二周期结束时间相同,第四周期长度是第二周期长度的千分之一。网络设备可以将在第四周期内队列的平均流量负载与预定值相乘,得到比较阈值。比较阈值反映的是更为实时的平均流量负载情况。示例性的,网络设备可以通过如下公式得到比较阈值,其中:
Th1=CQ_out*Target_Delay
其中,Th1表示在第四周期结束后计算得到的比较阈值,CQ_out表示在第四周期内队列的平均流量负载,Target_Delay表示预定值。
需要说明的是,预定值例如是目标时延,预定值可以为用户指定的大小,属于可配置 的数值,若需求是队列缓存的数据量少,时延小,预定值就可以尽量接近空载时的往返时延(Round-Trip Time,RTT);若需求是提升带宽利用率,避免欠吞吐,预定值就可以大于RTT。RTT指的是从发送设备发送数据开始,到发送设备收到来自接收设备的确认(接收设备收到报文后便立即发送确认),总共经历的时延。
步骤S705:网络设备用比较阈值和根据检测的结果设置的拥塞阈值较小者设置拥塞阈值。
网络设备可以将比较阈值和根据检测的结果设置的拥塞阈值进行比较,将比较阈值和根据检测的结果设置的拥塞阈值中最小的阈值作为在第二周期的下一周期内队列的拥塞阈值。
步骤S706:当队列中缓存的报文量大于拥塞阈值时,网络设备对接收的报文进行标记,将标记后的报文入队该队列。
步骤S707:网络设备将从队列出队的标记后的报文发送给接收设备。
在图7所描述的方法中,网络设备在第一周期结束后将拥塞阈值增加固定值,在第二周期内检测队列的平均流量负载减去在第一周期内队列的平均流量负载的差值是否大于目标增加值,在第二周期结束后根据检测的结果设置拥塞阈值,网络设备还可以根据在第四周期内队列的平均流量负载,计算比较阈值,将比较阈值和根据检测结果设置的拥塞阈值中最小的阈值作为拥塞阈值,当队列中缓存的报文量大于该拥塞阈值时,网络设备可以对接收的报文进行标记,将标记后的报文入队该队列,网络设备将从队列出队的标记后的报文发送给接收设备。图7所示方法中,根据检测的结果设置拥塞阈值可以根据多个周期内平均流量负载变化情况逐步调整拥塞阈值,而根据比较阈值设置拥塞阈值则可以反映更小周期内平均流量负载的情况,根据检测的结果设置的拥塞阈值可以在确保队列缓存的报文量较小的情况下,提升队列的吞吐量,提高拥塞控制效率,同时结合比较阈值的计算和比较,当比较阈值更小时,根据比较阈值设置拥塞阈值,能更加反映控制的实时性,平均流量负载突然增加时提升水线,避免欠吞吐,平均流量负载降低时,降低水线,尽快通知源端降速,避免队列过度堆积。当第二周期结束时,如果第四周期平均流量负载下降较多,使得比较阈值小于图2、4或者6所示实施例中计算的拥塞阈值,则根据比较阈值设置拥塞阈值可以更贴近实时流量负载情况,尽快通知源端降速,避免队列过度堆积。
上述详细阐述了本申请实施例的方法,下面提供了本申请实施例的装置。
请参见图8,图8是本申请实施例提供的一种网络设备的结构示意图,用于实现图2、4、6、7实施例中网络设备的功能,网络设备的功能块可由硬件、软件或硬件与软件的组合来实施本申请方案。所属领域的技术人员应理解,图8中所描述的功能块可经组合或分离为若干子块以实施本申请方案。因此,本申请中上面描述的内容可支持对下述功能模块的任何可能的组合或分离或进一步定义。
如图8所示,网络设备可包括:处理模块801和发送模块802,其中,各个模块的详细描述如下。
处理模块801,用于在第一周期结束后将拥塞阈值增加固定值,在第二周期内检测所述网络设备上队列的平均流量负载减去在所述第一周期内所述队列的平均流量负载的差值是否大于目标增加值,并在所述第二周期结束后根据所述检测的结果设置所述拥塞阈值,所 述第一周期是所述第二周期的上一周期;
所述处理模块801,还用于当所述队列中缓存的报文量大于所述拥塞阈值时,对接收的报文进行标记,将标记后的报文入队所述队列,所述标记指示所述网络设备上发生拥塞;
发送模块802,用于将从所述队列出队的标记后的报文发送给接收设备。
可选的,所述处理模块801设置所述拥塞阈值,包括:
当所述检测的结果为是时,保持增加固定值后的拥塞阈值不变。
可选的,所述处理模块801设置所述拥塞阈值,包括:
当所述检测的结果为否且所述差值不小于目标减小值时,将增加固定值后的拥塞阈值减去所述固定值。
可选的,所述处理模块801设置所述拥塞阈值,包括:
当所述检测的结果为否且所述差值小于目标减小值时,将增加固定值后的拥塞阈值乘以所述第二周期内所述队列的平均流量负载与所述第一周期内所述队列的平均流量负载的比值。
可选的,所述处理模块801,还用于检测到在第三周期内所述队列的平均流量负载减去所述第三周期的上一周期内所述队列的平均流量负载的差值小于目标减小值时,在所述第三周期结束后将所述拥塞阈值乘以所述第三周期内所述队列的平均流量负载与所述第三周期的上一周期内所述队列的平均流量负载的比值。
可选的,所述处理模块801设置所述拥塞阈值,包括:
当所述检测的结果为是时,将增加固定值后的拥塞阈值再次增加所述固定值。
可选的,所述处理模块801设置所述拥塞阈值,包括:
根据在第四周期内所述队列的平均流量负载,计算比较阈值,所述第二周期包括所述第四周期;
用所述比较阈值和所述增加固定值后的拥塞阈值较小者设置所述拥塞阈值。
可选的,所述处理模块801计算比较阈值,包括:
将在所述第四周期内所述队列的平均流量负载与预定值相乘,得到所述比较阈值。
可选的,所述处理模块801设置所述拥塞阈值,包括:
根据在所述第二周期内所述队列的平均流量负载,计算比较阈值;
用所述比较阈值和所述增加固定值后的拥塞阈值较小者设置所述拥塞阈值。
可选的,所述处理模块801计算比较阈值,包括:
将在所述第二周期内所述队列的平均流量负载与预定值相乘,得到所述比较阈值。
需要说明的是,各个模块的实现还可以对应参照图2、4、6、7所示的实施例的相应描述。
可选的,图8所示网络设备还可以包括接收模块,用于从发送设备接收报文,并将接收的报文发送到处理模块。
需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。本申请实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
请参见图9,图9是本申请实施例公开的一种网络设备的结构示意图。如图9所示,该 网络设备可以包括:至少一个处理器901、总线902和网络接口903。可选地,网络设备还可以包括存储器904。网络设备还可以包括队列905,队列905可以由硬件实现或是由硬件结合软件实现。其中,网络接口903、存储器904以及处理器901可以通过总线902相互连接。总线902可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
其中,处理器901可以是CPU,NP,通用处理器,数字信号处理器(Digital Signal Processor,DSP),专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。在处理器901是一个CPU的情况下,该CPU可以是单核CPU,也可以是多核CPU。
其中,网络接口903可以包括输出端口,用于将标记后的报文发送给接收设备。网络接口903还可以包括输入端口,用于从发送设备接收报文。网络设备还可以通过不同的网络接口903分别发送和接收报文。
其中,存储器904具体可以用于存储拥塞阈值等,存储器904例如是寄存器。可选地,存储器904可以包括在处理器901中。队列905可以用于缓存处理器发出的要从输出端口发出的报文。
网络设备还可以包括用于存储计算机程序指令的存储器906,处理器901可以通过执行存储器906上的计算机程序指令,使得网络设备执行如图2、4、6、7所示中网络设备执行的方法,此时处理器901可以是CPU或NP。存储器906可以包括易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器也可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM),快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器还可以包括上述种类的存储器的组合。
处理器901是NP或NP与FPGA的组合时,处理器901可以直接执行该处理器901内部存储的指令,使得网络设备执行如图2、4、6、7所示中网络设备执行的方法,或者处理器901是NP或NP与FPGA的组合时,直接通过内部硬件电路(例如FPGA电路)执行操作,使得网络设备执行如图2、4、6、7所示中网络设备执行的方法。处理器901可以实现图8中处理模块的功能,网络接口903可以实现图8中发送模块的功能。网络设备中各部件可以执行如下操作:
处理器901,用于在第一周期结束后将拥塞阈值增加固定值,在第二周期内检测所述网络设备上队列的平均流量负载减去在所述第一周期内所述队列的平均流量负载的差值是否大于目标增加值,并在所述第二周期结束后根据所述检测的结果设置所述拥塞阈值,所述第一周期是所述第二周期的上一周期;
所述处理器901,还用于当所述队列中缓存的报文量大于所述拥塞阈值时,对接收的报文进行标记,将标记后的报文入队所述队列,所述标记指示所述网络设备上发生拥塞;
网络接口903,用于将从所述队列出队的标记后的报文发送给接收设备。
可选的,所述处理器901设置所述拥塞阈值,具体用于:
当所述检测的结果为是时,保持增加固定值后的拥塞阈值不变。
可选的,所述处理器901设置所述拥塞阈值,具体用于:
当所述检测的结果为否且所述差值不小于目标减小值时,将增加固定值后的拥塞阈值减去所述固定值。
可选的,所述处理器901设置所述拥塞阈值,具体用于:
当所述检测的结果为否且所述差值小于目标减小值时,将增加固定值后的拥塞阈值乘以所述第二周期内所述队列的平均流量负载与所述第一周期内所述队列的平均流量负载的比值。
可选的,所述处理器901,还用于检测到在第三周期内所述队列的平均流量负载减去所述第三周期的上一周期内所述队列的平均流量负载的差值小于目标减小值时,在所述第三周期结束后将所述拥塞阈值乘以所述第三周期内所述队列的平均流量负载与所述第三周期的上一周期内所述队列的平均流量负载的比值。
可选的,所述处理器901设置所述拥塞阈值,具体用于:
当所述检测的结果为是时,将增加固定值后的拥塞阈值再次增加所述固定值。
可选的,所述处理器901设置所述拥塞阈值,具体用于:
根据在四周期内所述队列的平均流量负载,计算比较阈值,所述第二周期包括所述第四周期;
用所述比较阈值和所述增加固定值后的拥塞阈值较小者设置所述拥塞阈值。
可选的,所述处理器901计算比较阈值,具体用于:
将在所述第四周期内所述队列的平均流量负载与预定值相乘,得到所述比较阈值。
可选的,所述处理器901设置所述拥塞阈值,具体用于:
根据在所述第二周期内所述队列的平均流量负载,计算比较阈值;
用所述比较阈值和所述增加固定值后的拥塞阈值较小者设置所述拥塞阈值。
可选的,所述处理器901计算比较阈值,具体用于:
将在所述第二周期内所述队列的平均流量负载与预定值相乘,得到所述比较阈值。
应当理解,网络设备仅为本申请实施例提供的一个例子,并且,网络设备可具有比示出的部件更多或更少的部件,可以组合两个或更多个部件,或者可具有部件的不同配置实现。
具体的,本申请实施例中介绍的网络设备可以用以实施本申请结合图2-7介绍的方法实施例中的部分或全部流程。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务 器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。

Claims (25)

  1. 一种拥塞控制方法,其特征在于,所述方法包括:
    网络设备在第一周期结束后将拥塞阈值增加固定值,在第二周期内检测所述网络设备上队列的平均流量负载减去在所述第一周期内所述队列的平均流量负载的差值是否大于目标增加值,并在所述第二周期结束后根据所述检测的结果设置所述拥塞阈值,所述第一周期是所述第二周期的上一周期;
    当所述队列中缓存的报文量大于所述拥塞阈值时,所述网络设备对接收的报文进行标记,将标记后的报文入队所述队列,所述标记指示所述网络设备上发生拥塞;
    所述网络设备将从所述队列出队的标记后的报文发送给接收设备。
  2. 如权利要求1所述的方法,其特征在于,所述根据所述检测的结果设置所述拥塞阈值,包括:
    当所述检测的结果为是时,所述网络设备保持增加固定值后的拥塞阈值不变。
  3. 如权利要求1或2所述的方法,其特征在于,所述根据所述检测的结果设置所述拥塞阈值,包括:
    当所述检测的结果为否且所述差值不小于目标减小值时,所述网络设备将增加固定值后的拥塞阈值减去所述固定值。
  4. 如权利要求1至3任一项所述的方法,其特征在于,所述根据所述检测的结果设置所述拥塞阈值,包括:
    当所述检测的结果为否且所述差值小于目标减小值时,所述网络设备将增加固定值后的拥塞阈值乘以所述第二周期内所述队列的平均流量负载与所述第一周期内所述队列的平均流量负载的比值。
  5. 如权利要求1至3任一项所述的方法,其特征在于,所述方法还包括:
    所述网络设备检测到在第三周期内所述队列的平均流量负载减去所述第三周期的上一周期内所述队列的平均流量负载的差值小于目标减小值时,在所述第三周期结束后将所述拥塞阈值乘以所述第三周期内所述队列的平均流量负载与所述第三周期的上一周期内所述队列的平均流量负载的比值。
  6. 如权利要求1所述的方法,其特征在于,所述根据所述检测的结果设置所述拥塞阈值,包括:
    当所述检测的结果为是时,所述网络设备将增加固定值后的拥塞阈值再次增加所述固定值。
  7. 如权利要求1所述的方法,其特征在于,所述根据所述检测的结果设置所述拥塞阈值,还包括:
    所述网络设备根据在第四周期内所述队列的平均流量负载,计算比较阈值,所述第二周期包括所述第四周期;
    所述网络设备用所述比较阈值和所述增加固定值后的拥塞阈值较小者设置所述拥塞阈值。
  8. 如权利要求7所述的方法,其特征在于,所述网络设备计算比较阈值,包括:
    所述网络设备将在所述第四周期内所述队列的平均流量负载与预定值相乘,得到所述比较阈值。
  9. 一种网络设备,其特征在于,所述网络设备包括:
    处理模块,用于在第一周期结束后将拥塞阈值增加固定值,在第二周期内检测所述网络设备上队列的平均流量负载减去在所述第一周期内所述队列的平均流量负载的差值是否大于目标增加值,并在所述第二周期结束后根据所述检测的结果设置所述拥塞阈值,所述第一周期是所述第二周期的上一周期;
    所述处理模块,还用于当所述队列中缓存的报文量大于所述拥塞阈值时,对接收的报文进行标记,将标记后的报文入队所述队列,所述标记指示所述网络设备上发生拥塞;
    发送模块,用于将从所述队列出队的标记后的报文发送给接收设备。
  10. 如权利要求9所述的网络设备,其特征在于,所述处理模块设置所述拥塞阈值,包括:
    当所述检测的结果为是时,保持增加固定值后的拥塞阈值不变。
  11. 如权利要求9或10所述的网络设备,其特征在于,所述处理模块设置所述拥塞阈值,包括:
    当所述检测的结果为否且所述差值不小于目标减小值时,将增加固定值后的拥塞阈值减去所述固定值。
  12. 如权利要求9至11任一项所述的网络设备,其特征在于,所述处理模块设置所述拥塞阈值,包括:
    当所述检测的结果为否且所述差值小于目标减小值时,所述网络设备将增加固定值后的拥塞阈值乘以所述第二周期内所述队列的平均流量负载与所述第一周期内所述队列的平均流量负载的比值。
  13. 如权利要求9至11任一项所述的网络设备,其特征在于,
    所述处理模块,还用于检测到在第三周期内所述队列的平均流量负载减去所述第三周期的上一周期内所述队列的平均流量负载的差值小于目标减小值时,在所述第三周期结束后将所述拥塞阈值乘以所述第三周期内所述队列的平均流量负载与所述第三周期的上一周期内所述队列的平均流量负载的比值。
  14. 如权利要求9所述的网络设备,其特征在于,所述处理模块设置所述拥塞阈值,包括:
    当所述检测的结果为是时,将增加固定值后的拥塞阈值再次增加所述固定值。
  15. 如权利要求9所述的网络设备,其特征在于,所述处理模块设置所述拥塞阈值,包括:
    根据在第四周期内所述队列的平均流量负载,计算比较阈值,所述第二周期包括所述第四周期;
    用所述比较阈值和所述增加固定值后的拥塞阈值较小者设置所述拥塞阈值。
  16. 如权利要求15所述的网络设备,其特征在于,所述处理模块计算比较阈值,包括:
    将在所述第四周期内所述队列的平均流量负载与预定值相乘,得到所述比较阈值。
  17. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有计算机程序指令,所述计算机程序指令被网络设备执行时,使得所述网络设备执行如权利要求1-8任一项所述的拥塞控制方法。
  18. 一种网络设备,其特征在于,所述网络设备包括:
    处理器,用于在第一周期结束后将拥塞阈值增加固定值,在第二周期内检测所述网络设备上队列的平均流量负载减去在所述第一周期内所述队列的平均流量负载的差值是否大于目标增加值,并在所述第二周期结束后根据所述检测的结果设置所述拥塞阈值,所述第一周期是所述第二周期的上一周期;
    所述处理器,还用于当所述队列中缓存的报文量大于所述拥塞阈值时,对接收的报文进行标记,将标记后的报文入队所述队列,所述标记指示所述网络设备上发生拥塞;
    网络接口,用于将从所述队列出队的标记后的报文发送给接收设备。
  19. 如权利要求18所述的网络设备,其特征在于,所述处理器设置所述拥塞阈值,包括:
    当所述检测的结果为是时,保持增加固定值后的拥塞阈值不变。
  20. 如权利要求18或19所述的网络设备,其特征在于,所述处理器设置所述拥塞阈值,包括:
    当所述检测的结果为否且所述差值不小于目标减小值时,将增加固定值后的拥塞阈值减去所述固定值。
  21. 如权利要求18至20任一项所述的网络设备,其特征在于,所述根据所述检测的结果设置所述拥塞阈值,包括:
    当所述检测的结果为否且所述差值小于目标减小值时,所述网络设备将增加固定值后的拥塞阈值乘以所述第二周期内所述队列的平均流量负载与所述第一周期内所述队列的平均流量负载的比值。
  22. 如权利要求18至20任一项所述的网络设备,其特征在于,
    所述处理器,还用于检测到在第三周期内所述队列的平均流量负载减去所述第三周期的上一周期内所述队列的平均流量负载的差值小于目标减小值时,在所述第三周期结束后将所述拥塞阈值乘以所述第三周期内所述队列的平均流量负载与所述第三周期的上一周期内所述队列的平均流量负载的比值。
  23. 如权利要求18所述的网络设备,其特征在于,所述处理器设置所述拥塞阈值,包括:
    当所述检测的结果为是时,将增加固定值后的拥塞阈值再次增加所述固定值。
  24. 如权利要求18所述的网络设备,其特征在于,所述处理器设置所述拥塞阈值,包括:
    根据在第四周期内所述队列的平均流量负载,计算比较阈值,所述第二周期包括所述第四周期;
    用所述比较阈值和所述增加固定值后的拥塞阈值较小者设置所述拥塞阈值。
  25. 如权利要求24所述的网络设备,其特征在于,所述处理器计算比较阈值,包括:
    将在所述第四周期内所述队列的平均流量负载与预定值相乘,得到所述比较阈值。
PCT/CN2019/077599 2018-03-14 2019-03-11 拥塞控制方法及网络设备 WO2019174536A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP19766483.2A EP3758315B1 (en) 2018-03-14 2019-03-11 Congestion control method and network device
US17/018,566 US11233746B2 (en) 2018-03-14 2020-09-11 Congestion control method and network device
US17/645,411 US11652752B2 (en) 2018-03-14 2021-12-21 Congestion control method and network device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810208950.1 2018-03-14
CN201810208950.1A CN110278157B (zh) 2018-03-14 2018-03-14 拥塞控制方法及网络设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/018,566 Continuation US11233746B2 (en) 2018-03-14 2020-09-11 Congestion control method and network device

Publications (1)

Publication Number Publication Date
WO2019174536A1 true WO2019174536A1 (zh) 2019-09-19

Family

ID=67907322

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/077599 WO2019174536A1 (zh) 2018-03-14 2019-03-11 拥塞控制方法及网络设备

Country Status (4)

Country Link
US (2) US11233746B2 (zh)
EP (1) EP3758315B1 (zh)
CN (1) CN110278157B (zh)
WO (1) WO2019174536A1 (zh)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110278157B (zh) * 2018-03-14 2022-08-09 华为技术有限公司 拥塞控制方法及网络设备
CN114303138A (zh) * 2019-09-11 2022-04-08 英特尔公司 用于多核计算环境的硬件队列调度
CN112910789A (zh) * 2019-12-03 2021-06-04 华为技术有限公司 拥塞控制方法以及相关设备
CN111726201B (zh) * 2020-06-15 2023-09-12 合肥哈工轩辕智能科技有限公司 一种airt-ros虚拟网卡丢包解决方法
CN113973085B (zh) * 2020-07-22 2023-10-20 华为技术有限公司 一种拥塞控制方法和装置
CN112187651B (zh) * 2020-09-09 2022-06-21 苏州浪潮智能科技有限公司 一种流量调度方法、装置、设备及可读介质
CN114531487A (zh) * 2020-10-30 2022-05-24 华为技术有限公司 缓存管理方法及装置
CN112887218B (zh) * 2020-12-22 2022-10-21 新华三技术有限公司 一种报文转发方法及装置
CN115086236A (zh) * 2021-03-11 2022-09-20 中国电信股份有限公司 调整数据转发队列的方法、装置及计算机可读存储介质
US11831531B2 (en) * 2021-10-18 2023-11-28 Capital One Services, Llc Methods and systems for determining severity of disruptions in communication networks in non-homogenous environments
CN114124820A (zh) * 2021-11-15 2022-03-01 京东科技控股股份有限公司 流量控制方法、装置、电子设备及存储介质
CN114051002B (zh) * 2021-11-30 2024-03-19 新华三大数据技术有限公司 Ecn水线确定方法、装置及电子设备
CN113938433B (zh) * 2021-12-02 2024-02-02 中国人民解放军国防科技大学 一种基于动态阈值的高速网络拥塞控制方法和装置
CN113938432B (zh) * 2021-12-02 2024-01-02 中国人民解放军国防科技大学 一种高速互连网络拥塞控制打标方法和装置
CN115174476B (zh) * 2022-06-30 2023-08-04 苏州浪潮智能科技有限公司 一种ecn控制方法、装置以及介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1910868A (zh) * 2003-12-23 2007-02-07 艾利森电话股份有限公司 用于控制队列缓冲器的方法及装置
CN1910867A (zh) * 2003-12-23 2007-02-07 艾利森电话股份有限公司 用于控制队列缓冲器的方法及装置
CN106789701A (zh) * 2016-12-30 2017-05-31 北京邮电大学 一种数据中心中自适应ecn标记方法及装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1249972A1 (en) * 2001-04-09 2002-10-16 Telefonaktiebolaget L M Ericsson (Publ) Method of controlling a queue buffer
US7000025B1 (en) * 2001-05-07 2006-02-14 Adaptec, Inc. Methods for congestion mitigation in infiniband
US8004976B2 (en) * 2007-03-12 2011-08-23 Cisco Technology, Inc. Monitoring, controlling, and preventing traffic congestion between processors
US20130155855A1 (en) * 2010-08-09 2013-06-20 Nokia Siemens Networks Oy Increasing Efficiency of Admission Control in a Network
US8788728B2 (en) * 2011-12-16 2014-07-22 Maxlinear, Inc. Method and system for buffer state based low power operation in a MoCA network
EP2884707B1 (en) * 2013-12-16 2016-04-27 Alcatel Lucent Method for controlling buffering of packets in a communication network
US10069744B2 (en) * 2015-07-14 2018-09-04 Alcatel Lucent Method and apparatus for managing network congestion
EP3267639B1 (en) * 2016-07-06 2019-12-25 Alcatel Lucent Congestion control within a communication network
CN110278157B (zh) * 2018-03-14 2022-08-09 华为技术有限公司 拥塞控制方法及网络设备

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1910868A (zh) * 2003-12-23 2007-02-07 艾利森电话股份有限公司 用于控制队列缓冲器的方法及装置
CN1910867A (zh) * 2003-12-23 2007-02-07 艾利森电话股份有限公司 用于控制队列缓冲器的方法及装置
CN106789701A (zh) * 2016-12-30 2017-05-31 北京邮电大学 一种数据中心中自适应ecn标记方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3758315A4 *

Also Published As

Publication number Publication date
CN110278157B (zh) 2022-08-09
EP3758315A4 (en) 2021-03-10
CN110278157A (zh) 2019-09-24
EP3758315B1 (en) 2023-06-14
US11652752B2 (en) 2023-05-16
EP3758315A1 (en) 2020-12-30
US11233746B2 (en) 2022-01-25
US20220116331A1 (en) 2022-04-14
US20200412660A1 (en) 2020-12-31

Similar Documents

Publication Publication Date Title
WO2019174536A1 (zh) 拥塞控制方法及网络设备
CN108243116B (zh) 一种流量控制方法及交换设备
EP3075105B1 (en) Transferring data between a first network node and a second network node
WO2020001192A1 (zh) 一种数据传输方法、计算设备、网络设备及数据传输系统
US10193831B2 (en) Device and method for packet processing with memories having different latencies
EP4175232A1 (en) Congestion control method and device
WO2019134383A1 (zh) 控制网络拥塞的方法、接入设备和计算机可读存储介质
CN112104562B (zh) 拥塞控制方法及装置、通信网络、计算机存储介质
WO2019169556A1 (zh) 一种报文发送的方法、装置和存储设备
WO2021052374A1 (zh) 网络拥塞控制方法、节点、系统及存储介质
WO2021042831A1 (zh) 一种控制数据传输的方法、装置及存储介质
EP3018868B1 (en) Congestion method, device and system
US10419370B2 (en) Hierarchical packet buffer system
WO2022001175A1 (zh) 数据包发送的方法、装置
US20200351215A1 (en) Data Stream Sending Method and System, and Device
WO2019085907A1 (zh) 一种基于软件定义网络的数据发送方法、装置及系统
US20230370387A1 (en) Network congestion handling method, apparatus, and device
US11165705B2 (en) Data transmission method, device, and computer storage medium
US10951526B2 (en) Technologies for efficiently determining a root of congestion with a multi-stage network switch
US11924106B2 (en) Method and system for granular dynamic quota-based congestion management
WO2023226532A1 (zh) 拥塞控制方法、节点及系统
US20230061885A1 (en) Method and system for dynamic quota-based congestion management
WO2023221780A1 (en) Hardware accelerated temporal congestion signals
WO2023226603A1 (zh) 一种抑制拥塞队列产生的方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19766483

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019766483

Country of ref document: EP

Effective date: 20200925