Exemplary embodiments of the present disclosure relate to reducing network latency in network components. More specifically, the exemplary embodiments relate to methods, devices and computer-readable media for reducing latency in network components having one or more physical queues using one or more virtual queues.
In ideal networks, data backups would not occur in network switching, and electronic memory would not be needed in network components in order to implement and manage data queues. In reality, network switches support different applications that have different performance requirements and make different demands of the network. This can lead to different priorities and classifications of data communicated over the network, and network switching backups can result.
An apparatus, computer-readable medium and associated methodology for reducing latency in network components having a plurality of physical queues by using a plurality of virtual queues, as set forth more completely in the claims
A more complete appreciation of the disclosure and many of the attendant advantages thereof will be readily obtained as the same becomes better understood by reference to the following detailed description when considered in connection with the accompanying drawings, wherein:
In an exemplary aspect, a method for reducing latency in a network device includes storing packets received from a network in a plurality of physical queues in circuitry of the network device. Each packet is stored according to an associated class of service (COS) and a COS associated with each of the physical queues. Each physical queue is also scheduled according to its corresponding COS and, more specifically, in accordance with a quality of service (QoS) set for the COS. The method also includes shadowing the plurality of physical queues with a plurality of virtual queues that are implemented in the circuitry of the network device, and determining, with the circuitry of the network device, whether congestion exists in at least one of the plurality of virtual queues. Packets departing from at least one of the plurality of physical queues are marked by the circuitry of the network device, when congestion is determined to exist in the at least one of the virtual queues. In the method, a service rate of the virtual queues is less than or equal to a port link rate of the network device.
In another exemplary aspect, a device for reducing latency in a network apparatus includes circuitry configured to store packets received from a network in a plurality of physical queues according to a class of service (COS) associated with each packet and a COS associated with each physical queue. The physical queues are scheduled according to their associated COS and, more specifically, in accordance with a QoS set for that COS. The circuitry is also configured to shadow the plurality of physical queues with a plurality of virtual queues, and to determine whether congestion exists in at least one of the plurality of virtual queues. The circuitry marks packets departing from at least one of the plurality of physical queues when congestion is determined to exist in the at least one of the plurality of virtual queues, and a service rate of the virtual queues is less than or equal to a port link rate of the network device.
In a further exemplary aspect, a non-transitory computer-readable medium is encoded with computer-readable instructions that, when executed by a processor, cause the processor to perform a method for reducing latency in a network component. The method includes storing packets received from a network in a plurality of physical queues, where each packet is stored according to a class of service (COS) associated with the packet and a COS associated with each of the physical queues. The physical queues are scheduled according to their associated COS and, more specifically, according to the QoS set for that COS. The method also includes shadowing the plurality of physical queues with a plurality of virtual queues, and determining whether congestion exists in at least one of the virtual queues. The method further includes marking packets departing from at least one of the plurality of physical queues, when congestion is determined to exist in the at least one of the virtual queues. The service rate of the virtual queues is less than or equal to the port link rate of a network device in which the processor is included.
Referring now to the drawings, wherein like reference numerals designate identical or corresponding parts throughout the several views,
The egress port 150 of the network switch includes a class of service (COS) processing circuit 130 that has a physical queue 125 and a physical link scheduler 140. The packets received at the arrival rate 120 are stored in the physical queue 125 and are serviced at a service rate 135 set by the physical link scheduler 140. The physical link rate 145 is an attribute of the egress port 150 itself, and the physical service rate 135 is less than or, at most, equal to the physical link rate 145. When the egress port 150 includes multiple physical queues, the sum of their respective physical service rates will be less than or equal to the physical port link rate 145.
Returning to the example of
If the arrival rate 120 of the packets is greater that the service rate 135 provided by the COS processing circuit 130, the occupancy of the physical queue 125 rises as the physical queue 125 stores more and more packets in an effort to compensate for the difference between the arrival rate 120 and the service rate 135. This causes congestion in the COS processing circuit 130 since it is not able to transmit packets at the same rate as it receives them, and may result in degradation in the quality of service (QoS) that is needed for the particular COS handled by the COS processing circuit 130.
To mitigate the effects of a disparity between the arrival rate 120 and the service rate 135, a threshold K, which may be fixed or user-settable, can be established to identify congestion in the physical queue 125 before the physical queue 125 is fully occupied by packets. When the occupancy of the physical buffer 125 reaches the threshold K, the COS processing circuit 130 begins marking packets to communicate that the physical queue 125 is congested to other network devices, such as the DCTCP sender 115. The other network devices receive information regarding the congestion in the physical queue 125 based on the number of marked packets, and reduce their transmission rate accordingly. This effectively lowers the arrival rate 120, allowing the physical queue 125 to drain below the threshold K. Once this occurs, the COS processing circuit 130 stops marking packets and the arrival rate 120 is allowed to increase.
As can be appreciated, congestion in the physical queue 125 may be determined by methods other than comparing occupancy to a threshold. The rate at which the physical queue 125 fills with packets may also be used to identify congestion. For example, congestion may be identified if the physical queue 125 fills at a rate that exceeds a predetermined value regardless of whether the occupancy of the physical queue 125 exceeds the threshold K. Of course, the rate at which the physical queue 125 fills with packets may be used in conjunction with the occupancy thresholding described above in order to identify congestion. Other methods of identifying congestion are also possible without departing from the scope of the present disclosure.
The packet marking can be performed by marking each packet with a single “congestion” bit, or by marking each packet with a multi-bit word identifying the level of congestion present in the physical queue 125. In the case that each packet is marked by a single bit, the network devices determine the amount of congestion by the number of packets marked. For example, a relatively low level of congestion may be communicated to the network device by marking one packet out of a hundred, and a relatively high level of congestion may be indicated by marking ninety out of a hundred packets. In this way, the network devices are able to determine both the presence and level of congestion and throttle back their respective transmission rates accordingly.
Alternatively, the egress port 150 may send an explicit congestion message to the network devices instead of marking packets. Thus, the specific manner in which network devices are notified of the congestion in the egress port 150 is not limiting upon the present disclosure.
For the sake of brevity,
In operation, packets are received by the physical queue 220 at the arrival rate 215. While the packets are physically stored in the physical queue 220, they are also virtually stored in the virtual queue 245. For example, the virtual queue 245 may be a counter that is incremented each time a packet is serviced, i.e., departs from, the physical queue 220, and is decremented based on the service rate 255 of the virtual queue 245. When the service rate 255 of the virtual queue 245 is less than the service rate 230 of the physical queue 220, the virtual queue 245 fills faster than the physical queue 220. If the occupancy of the virtual queue 245 reaches the threshold K, packets departing from the physical queue 220 are marked as described above in order to signal congestion to other network devices. This means that while the virtual queue 245 may become congested, the physical queue 220 will actually store only a number of packets or even no packets at all because the physical queue 220 drains faster than the virtual queue 245.
The threshold K can be set to any value, as will be appreciated by one of ordinary skill in the art. As noted above, the rate at which the virtual queue 245 fills may also be used instead of, or in addition to, the threshold K. Egress port 270 may also send congestion messages to the other network devices, rather than mark packets, as can be appreciated.
Also, the service rate 255 of the virtual queue 245 may be set to any value based on network conditions and desired performance. However, setting the service rate 255 of the virtual queue 245 much lower than the service rate 230 of the physical queue will result in a high number of marked packets and can dramatically slow throughput via the egress port 270. In practice, setting the service rate 255 of the virtual queue 245 slightly below that of the physical queue 220 will have the desired effect of reducing congestion and the resulting latency without dramatically affecting overall throughput. Of course, the service rate 255 of the virtual queue 245 may be set equal to the service rate 230 of the physical queue 220, but this will cause the virtual queue 245 to fill at the same rate as the physical queue 220 and diminish the virtual queue's 245 ability to avoid packet build-up in the physical queue 220, and hence diminish its ability to reduce latency.
Next,
As can be appreciated, other processes for determining and mitigating congestion are also possible. For example, the occupancy of the virtual queue 245 can be determined periodically, and compared to the threshold K. Thus the above descriptions with regard to
Although the above descriptions relative to
Next, an egress port 470 with multiple service queues is described with reference to
The egress port 470 includes a physical COS processing circuit 450 and a virtual COS processing circuit 455. The physical COS processing circuit, in turn, includes four physical queues 410, 415, 420, 425, each corresponding to a different COS. Packets from the physical queues 410, 415, 420, 425 are scheduled by the physical link scheduler 460 according to the physical service rates PRS0-PRS3 of the physical queues 425, 420, 415, 410, respectively in order to output a stream of packets at the physical link rate 475, which is a function of the egress port 470.
The virtual COS processing circuit 455 includes four virtual queues 430, 435, 440, 445 and a virtual link scheduler 465 that sets the virtual link rate 480 and each of the virtual service rates VSR0-VSR3. The virtual queues 430, 435, 440, 445 shadow, or monitor, the physical queues 410, 415, 420, 425. Therefore, the virtual queues 430, 435, 440, 445 may be counters. Each of the virtual queues 430, 435, 440, 445 has a corresponding threshold K3-K0 in order to determine congestion. Thus, the occupancy of virtual queue 430 is compared to threshold K3, the occupancy of virtual queue 435 is compared to threshold K2, the occupancy of virtual queue 440 is compared to threshold K1, and the occupancy of virtual queue 445 is compared to threshold K0. As can be appreciated, the thresholds K0-K3 may be set to the same value or may be set to different values according to the performance desired for a given COS. Instead of, or in addition to, thresholding the occupancy of the virtual queues 430, 435, 440, 445, the rate at which these queues fill, i.e., their count rates may be used to identify congestion, as described above.
Because each physical queue 410, 415, 420, 425 of
The scheduling of the physical queues 410, 415, 420, 425 by the physical link scheduler 460 may result in the allocation of more bandwidth to one physical queue, for example the physical queue 410, than another, such as the physical queue 425. The virtual queues 430, 435, 440, 445 shadow the physical queues 410, 415, 420, 425 in a one-to-one correspondence. As such, the virtual link scheduler provides the most bandwidth to the virtual queue 430 since physical queue 410, which is monitored by virtual queue 430 has the most bandwidth among the physical queues. As noted above, however, the service rates VSR0-VSR3 of the virtual queues 445, 440, 435, 430 are set to be equal to, or preferably slightly less than, the physical service rates PSR0-PSR3 of the physical queues 425, 420, 415, 410.
In operation packets arriving at the arrival rates PAR0-PAR3 are placed in the different physical queues 410, 415, 420, 425 according to the COS associated with each packet. The virtual queues 430, 435, 440, 445 count, or virtually store, the packets that exit the corresponding physical queues 410, 415, 420, 425. Upon arrival of packets at the virtual queues 430, 435, 440, 445, the occupancy of the virtual queues 430, 435, 440, 445 are compared to their respective thresholds K3-K0. If any of the virtual queues 430, 435, 440, 445 exceeds its respective threshold K3-K0, the newly arrived packet(s) is/are marked to signal congestion to other network devices. Alternatively, the egress port 470 may send out express congestion messages to the other network devices.
Next, a method for reducing latency according to exemplary aspects of the disclosure is described with reference to the algorithmic flowchart of
The process of
When a packet arrives at virtual queue VQ1 at step 510, the occupancy of VQ1 is checked against the threshold K1 at step 530, and the newly arrived packet is marked at step 550 if the threshold K1 is determined to be exceeded at step 530. Then the process ends at step 565. If at step 530, it is determined that the occupancy of VQ1 is less than the threshold K1, the process ends at step 565 without marking the new packet.
When a packet arrives at virtual queue VQ2 at step 515, the process moves to step 535 to compare the occupancy of VQ2 against the threshold K2. If the threshold K2 is exceeded, the newly arrived packet is marked at step 555, and the process ends at step 565. If, on the other hand, the occupancy of VQ2 does not exceed the threshold K2, the process directly ends at step 565 without marking the new packet.
In the event that a packet arrives at virtual queue VQ3 in step 520, the process moves to step 540 in order to determine whether the occupancy of VQ3 exceeds the threshold K3. If it does, the process moves to step 560 where the newly arrived packet is marked, and then ends at step 565. If at step 540 it is determined that the occupancy of VQ3 does not exceed the threshold K3, the process ends at step 565 without marking the new packet.
The process of
Moreover, the above descriptions of
Next, a description of scheduling of physical queues according to exemplary aspects of the present disclosure is provided with reference to the table of
The demand for each COS handled by the physical queues COS0-COS3 is the same, 10 GB. To schedule COS3 to have the highest bandwidth, it is assigned the largest weight, which results in the largest bandwidth allocation of 4 GB. COS2-COS0 are respectively assigned weights 3, 2, 1 and have bandwidth allocations of 3 GB, 2 GB and 1 GB. In other words, at full rate, the expected service rates for COS3-COS4 is 4 GB, 3 GB, 2 GB and 1 GB, respectively. Of course, the demands, weights and bandwidth allocations of
Returning to
While the system of
Setting the service rates of the virtual queues at 95% of the service rates of the physical queues means that the virtual queues will experience congestions before the physical queues, and take steps to mitigate the congestion by notifying the other network devices. If the other network devices lower their demand, the arrival rates at the egress port will be lowered, and the service rates of the physical queues will also be effectively lowered. As a result, the service rates of the virtual queues, which are 95% of the service rates of the physical queues, will be lowered. This means that in the next iteration, the virtual queues will experience congestion even sooner, and send out marked packets as a result, further lowering the arrival rates and the physical service rates. This cycle can continue until the throughput for each COS effectively becomes zero.
To avoid the above issue, the service rates of the virtual queues may initially be set to 100% of the service rates of the physical queues. Then if the physical queues experience congestion, the service rates of the virtual queues may be lowered to, for example, 95% of the service rate of the physical queues. Thus, the above-described cycle that reduces throughput to zero can be avoided since when there is not congestion the service rates of the virtual queues are set equal to the service rates of the physical queues. This exemplary method of setting the service rates of the virtual queues is described below with reference to
The process of
When, at step 715, it is determined that the timer value T has reached zero, the process moves to step 725 where it is determined whether the occupancy of physical queue PQ0 has fallen below a predetermined threshold C, which may be zero or some other number. A queue is deemed to be backlogged, or congested, if it does not drain sufficient packets to cause its occupancy to fall below the threshold C within a defined period of time, for example time T in
After either step 720 or 730, the process moves to step 740 in which it is determined whether the occupancy of physical queue PQ1 has fallen below the threshold C or not. If the occupancy of PQ1 is below the threshold C, the process moves to step 735 to set the service rate of the corresponding virtual queue, for example VQ1 (not show), equal to the service rate of PQ1. Then the process moves to step 755. If at step 740 it is determined that the occupancy of PQ1 is above the threshold C, and therefore that PQ1 is congested, the process moves to step 745 to set the service rate of the corresponding virtual queue VQ1 to 95% of the service rate of PQ1. Then the process moves to step 755.
At step 755, the process checks to see whether the occupancy of physical queue PQ2 is below the threshold C. If it is, the process moves to step 750 to set the service rate of the corresponding virtual queue, for example VQ2 (not shown), equal to the service rate of PQ2. Then the process moves to step 770. If at step 755 it is determined that the occupancy of PQ2 is above the threshold C, the process moves to step 760 to set the service rate of the corresponding virtual queue VQ2 to 95% of the service rate of PQ2. Then the process moves to step 770.
At step 770, the process determines whether the occupancy of physical queue PQ3 is below the threshold C. If it is, the process moves to step 765 to set the service rate of the corresponding virtual queue, for example VQ3 (not shown), equal to the service rate of PQ3. If at step 770 it is determined that the occupancy of PQ3 is above the threshold C, then the process moves to step 775 to set the service rate of the corresponding virtual queue VQ3 to 95% of the service rate of PQ3. After either step 765 or step 775, the process returns to step 705 to reset the timer value and begin again
In the above description, the service rates of the virtual queues are set to be either equal to (Y=1) or to be 95% of (Y=0.95) of the service rate of the corresponding physical queue. However, other values are possible when setting the service rates of the virtual queues to be less than the service rates of the physical queues. For example, any value between 95% and 100% may be used. Further, more than two options for setting the service rates of the virtual queues may be provided. Several fractional values may be stored in a look-up table and the process may choose of those fractional values using predetermined criteria, such as a desired QoS, as an index to the look-up table. Thus, the above descriptions are exemplary and do not in any way limit this disclosure.
Next, strict priority scheduling in an egress port according to exemplary aspects of the present disclosure is described with reference to
In
Virtual queues VQ7-VQ0 are also arranged to shadow or monitor one or more of the physical queues COS7-COS0 in order to implement strict priority scheduling For example, in
As noted above, each virtual queue VQ7-VQ0 can be a counter. As such, virtual queue VQ0 is incremented any time that any of the physical queues COS7-COS0 output a packet. Virtual queue VQ1 is incremented any time that any one of physical queues COS7-COS1 output a packet, but not when physical queue COS0 outputs a packet. Virtual queue VQ2 is incremented any time that any of the physical queues COS7-COS2 output a packet, but not when physical queues COS1-COS0 output packets, and so on. Virtual queue VQ7 is incremented only when physical queue COS7 outputs a packet since VQ7 has the highest priority. The physical queues that cause a given virtual queue to increment are identified with either an “X” or the word “Mark” in
Each physical queue COS7-COS0 may have the same service rate, but they more likely have different service rates with the highest priority physical queue COS7 having the highest service rate and the lowest priority physical queue COS0 having the lowest service rate. However, for strict priority scheduling the service rates of the virtual queues VQ7-VQ0 are set to be fractions of the physical, or port, link rate, i.e., the overall drain rate of the egress port. Each virtual queue VQ7-VQ0 may be set to have the same service rate, or may have its own, different service rate as can be appreciated. Of course, congestions thresholds are also provided for the virtual queues, as described above.
In operation, the virtual queue VQ0 is incremented every time that a packet is serviced, i.e., outputted by any one of the physical queues COS7-COS0. If, as a result, VQ0 exceeds the threshold K, then VQ0 will mark a newly arrived packet from COS0, if available. If VQ1 exceeds the threshold K as a result of being incremented by serviced packets from any one of COS7-COS1, VQ1 will mark newly arrived packets from COS1. Each of the other virtual queues VQ2-VQ7 will also be incremented by serviced packets from the physical queues that they monitor, as indicated in
The above-described implementation of strict priority scheduling results in packets from COS0 being marked more frequently than, for example, packets from COS7. This in effect reduces the bandwidth used by the COS of physical queue COS0, and provides the additional bandwidth to the other, higher priority physical queues COS7-COS1. Thus, in strict priority, the bandwidth of higher priority queues is maintained at the expense of the lower priority queues.
Next, an exemplary method for reducing latency when strict priority scheduling is used is described with reference to
In
If any of the physical queues COS7-COS 1 outputs a packet, the process moves to step 910 in order to increment virtual queue VQ1 accordingly. Then at step 930 the occupancy of VQ1 is tested against the threshold K. If the occupancy of VQ1 exceeds the threshold K, the process moves to step 950 in order to mark newly arrived packets from the physical queue COS6. Then the process ends at step 965 with respect to VQ1. If at step 930 it is determined that the occupancy of VQ1 does not exceed the threshold K, the process ends at step 965, with respect to VQ1, without marking newly arrived packets from COS1. This process is carried out for every virtual queue VQ7-VQ0 and their corresponding monitored physical queues, as can be appreciated.
For example, at step 915 any packets arriving from physical queues COS7-COS6 cause the virtual queue VQ6 to be incremented. At step 935 the occupancy of VQ6 is checked against the threshold K, and newly arrived packets from COS6 are marked at step 955 if the occupancy of VQ6 exceeds the threshold K. Then the process ends at step 965 with respect to VQ6. If at step 935 it is determined that the occupancy of VQ6 does not exceed the threshold K, then the process ends at step 965, with respect to VQ6, without marking packets from COS6.
At step 920 virtual queue VQ7 is incremented if a packet arrives from physical queue COS7. Then whether the occupancy of VQ7 exceeds the threshold K is determined at step 940. If it does, newly arrived packets from COS7 are marked at step 960, and the process ends at step 965 with respect to VQ7. On the other hand, if at step 940 it is determined that the occupancy of VQ7 does not exceed the threshold K, the process ends at step 965, with respect to VQ7, without marking packets from COS7.
As noted above, because the process of
Further, in the descriptions of
In
A description of exemplary hardware for reducing latency according to exemplary aspects of this disclosure is provided next with reference to
Processor circuit 1000 may be a general purpose processor circuit having, for example, Harvard architecture, von Neumann architecture, ARM architecture or any combination thereof. The processor circuit 1000 may also include a co-processor to perform a subset of function. The processor circuit 1000 may also be a special-purpose processor, such as a digital signal processor (DSP) or a processor optimized for network communications. In addition or as an alternative, the processor circuit 1000 may be implemented as discrete logic components, in a field programmable gate array (FPGA), in a complex logic device (CPLD), or in an application specific integrated circuit (ASIC). In the event that the processing circuit 1000 is implemented in an FPGA or CPLD, the processor circuit may be organized using a hardware description language such as VHDL. This language describes how the circuit blocks of an FPGA or CPLD are to be connected together in order to provide the required hardware architecture, and the compiled VHDL code may be stored in RAM 1005, ROM 1010 or both. Other processor circuits are also possible as would be recognized by one of ordinary skill in the art.
RAM 1005 may be any random access electronic memory, such as dynamic RAM, static RAM or a combination thereof ROM 1010 may also be any form of read only electronic memory, such as erasable programmable ROM (EPROM), FLASH memory, and the like. All or a portion of RAM 1005 and ROM 1010 may be removable without departing from the scope of the present disclosure.
The network interface 1015 includes any and all circuitry necessary to communicate over a network, as would be recognized by one of ordinary skill in the art. The above-described egress port may be at least partly formed by network interface 1015, for example. Network interface 1015 may also have an ingress port such that packets would not necessarily have to travel via bus 1025 in order to be transmitted through the hardware structure of
The user interface 1020 allow a user to, for example, set the threshold value K, and to access other software controls. As such, the user interface 1020 can include connections for a keyboard, mouse and monitor, or any other user input/output device that is known.
The hardware structure of
In the above, latency reduction is described using a network switch egress port for clarity. However, the methods, devices and systems described herein are not limited to network switch egress ports, and may be used in other network components, such as servers, personal computers, and mobile devices. The network may also be wired, fiber optic or wireless, and may be public or private, or a combination of these without departing from the scope of the present disclosure.
Also, the above descriptions include descriptions of algorithmic flowcharts illustrating process steps. These flowcharts are exemplary and the process steps depicted therein may be performed in an order different from the order depicted in the figures. For example, the process steps may be performed in sequential, parallel or reverse order without departing from the scope of the present disclosure. Also, the above descriptions are organized as separate embodiments for ease of understanding of the inventive concepts described. However, one of ordinary skill in the art will recognize that the features of one embodiment may be combined with those of another without departing from the scope of the disclosure. Thus, the particular combination of features described in each of the embodiments is merely exemplary and may be combined without limitation to form additional embodiments without departing from the scope of the disclosure.
Obviously, numerous modifications and variations of the present invention are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims, the invention may be practiced otherwise than as specifically described herein.
This application is based upon and claims the benefit of priority to provisional U.S. Application No. 61/902,620 entitled “Enabling Virtual Queues with QoS and PFC Support and Strict Priority Scheduling” and filed Nov. 11, 2013. The entire contents of this provisional application are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
61902620 | Nov 2013 | US |