# Congestion Control Mechanism Based on Backpressure Feedback in Data Center Networks
## 3 Congestion Detection and Identification
### Observations and Insights  
In DCN, the PDP enables efficient packet processing and traffic management. Programmatically defining the processing logic of the data plane enables flexible deployment and management of network functions. P4 [34] is used as a domain-specific programming language to program the data plane. P4 can flexibly define various packet processing and forwarding logics and enables the programmable switches to more flexibly process and make decisions about packets, thus realizing fine-grained and efficient packet processing [35]. It is possible to obtain various information about packets passing through the current switch using P4, such as ingress and egress timestamps, ingress and egress port numbers, enqueue and dequeue depths, and so on. Among them, queue delay and queue depth are two signals that react to network congestion. In the PDP, when a packet enters the queue for the first time, the packet queue depth (_eng_depth_, in units of the number of packets) can reflect the number of packets waiting to be processed in the switch queue. The packet queue delay is the time spent by the packet in the queue (_deq_timedelta_, in microseconds). The queue delay can be used to evaluate the processing power and efficiency of the switch. The queue depth reflects the number of packets waiting to be processed in the queue but does not directly reflect the queue delay or transmission delay of the packets. In some cases, there may be a large transmission delay, even if the queue depth is small. This may affect user experience and application performance. Therefore, we observe the relationship between them through experiments to provide design concepts for congestion detection methods. To observe the relationship between queue delay and queue depth, we perform simulation tests under the topology shown in Figure 1. It contains three senders and one receiver. The link bandwidth is set to 10 Mbps, and the sending rate is set to 1000 pps. The marking threshold is set, and the packet marking is observed based on the queue depth. Switch 3 is the node where three flows share the buffer queue. Therefore, the experiment focuses on observing the changes in the buffer queue of Switch 3, as shown in Figure 2. When the switch processes about 200 packets, the queue depth grows dramatically. The switch buffer is filled quickly and kept in a high queue state, as shown in Figure 2a. Traffic A from Sender 1, Traffic B from Sender 2, and Traffic C from Sender 3 are all marked as congested, as shown in Figure 2b. This experiment shows that there is indeed congestion at Switch 3. Without comparing congestion with the other two switches, it is uncertain if there is a problem with multiple congestion points. The relationship between queue depth and queue delay is unknown. Based on these two issues, a new experiment is designed. The test scenario is adjusted to have the link bandwidth set to 1 Mbps, and the sender sends traffic to the receiver at a rate of 500 pps for 10 s. The queue depth and queue delay of the packets are captured, and the buffer information of Switch 1 and Switch 3 is observed, as shown in Figure 3. The buffer information of the packet passing through Switch 1 is shown in Figure 3a, and the buffer information passing through Switch 3 is shown in Figure 3b. Figure 1: Topology of the experiment. The colored lines show paths that differ from different traffic groups. When congestion occurs on a network device, the number of packets in the queue increases, resulting in an increase in queue delay. Excessive queue delay usually indicates insufficient processing power of the network device or insufficient network resources. In order to compare the congestion in response to the queue delay between different switches, the cumulative distribution function (CDF) of the queue delay of different switches is plotted, as shown in Figure 4. Using PDP to read the packets passing through the switch, it can be seen from the figure that the packets in the buffer have accumulated, and the queue delay has increased.