# A Sketch-Based Fine-Grained Proportional Integral Queue Management Method
## 3 System Model
### Queue Management
Transmission delay refers to the time the packet is used on the link, excluding the waiting time in the device buffer, whereas queuing delay refers to the waiting time of the packet in the device buffer. Therefore, if in the same network, the difference in the RTT of different packets is mainly determined by the queuing delay, which is related to the queue length of the buffer. However, maximizing throughput and minimizing RTT may be orthogonal. High throughput implies utilizing as much link bandwidth as possible, which may increase the queue length and, thus, cause delays. * **Throughput:** it is the maximum number of data packets received in a given period. The better the link performance, the higher the throughput. \[del\_cur=\frac{q\_len}{dq\_rate\_avg}\]1 (12) \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Value** \\ \hline LeafLink Bandwidth & 100 Mbps \\ BottleneckLink & 50 Mbps \\ LeafLink Delay & 5 ms \\ BottleneckLink Delay & 20 ms \\ Active Sender & 100 \\ Maxsize & 50 p \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Detailed parameters. Figure 3: The data structure of Sketch. where \(N\) denotes the number of packets received by all destination nodes over a period of time, and \(T\) denotes the time period. * **Fairness index**: Fairness between data streams implies that data streams passing through the bottleneck link can share bandwidth resources equally. The fairness index is used to reflect the fairness between the data streams in this case. The range of the fairness index is [0, 1], as shown in Equation (13); the higher the fairness index, the better the fairness [35]. \[FairnessIndex=\frac{(\sum th_{i})^{2}}{n\sum th_{i}^{2}}\] (13) where \(th_{i}\) represents the throughput of each flow. * **Packet drop**: active and passive packet drops are two types of packet drops. Active packet drop is the process of identifying and dropping packets before network congestion occurs, using the AQM algorithm. The buffer overflows and must be dropped in the case of passive packet drop. The more active packets that are dropped, the better the performance in predicting network congestion. ### Analysis of Simulation Results

1. Average queue length and RTT Maintaining a short average queue length helps to reduce the queuing time of packets forwarded to the route waiting time, which can effectively alleviate the \"bufferbloat\" problem. Figure 4a,b show the average queue lengths of the four algorithms for Scenario 1 and Scenario 2, respectively. From the figures, it can be seen that S-PIE is able to maintain a shorter average queue length than the classical algorithms RED, CoDel, and PIE under the same network environment. During the 20-s simulation period in Scenario 1, the average queue lengths for RED, CoDel, PIE, and S-PIE were measured approximately at 15.08, 53.78, 51.52, and 9.94 packets, respectively. In contrast to the RED, CoDel, and PIE algorithms, the S-PIE algorithm demonstrated significant reductions in average queue length, achieving approximately 34.12%, 81.51%, and 62.23% reductions, respectively. In Scenario 2, throughout the simulation duration, the average queue lengths for RED, CoDel, PIE, and S-PIE were observed to be 14.01, 43.81, 27.97, and 10.66 packets, respectively. In comparison to the RED, CoDel, and PIE algorithms, the S-PIE algorithm exhibited substantial reductions in average queue length, achieving approximately 23.91%, 75.67%, and 61.89% reductions, respectively. Moreover, the average queue length of PIE and CoDel showed a surge when the simulation experiment was carried out for 2 s, during which a large number of data streams came in on the link, and the processing of such burst data streams by PIE and CoDel was flawed, resulting in a possible surge of the queue. The average queue length of the RED and S-PIE algorithms always maintained a more stable state. The core idea of the RED algorithm is to calculate the packet drop rate using the average queue length, which is able to maintain a shorter average queue length than CoDel and PIE.