## 4 Design of RBMM
### Buffer Partitioning Based on Improved Dynamic Threshold Scheme  
Inspired by the shared memory switch buffer management scheme, we introduce the dynamic threshold (DT) [41] to divide the buffer into an allowed partition and a reserved partition. When the available buffer space decreases to the threshold of the reserved partition, the buffer is considered to be in congestion and switches to a restrictive state. When DT scheme was first proposed in the literature [41], the reserved buffer space was defined as follows:  
\[\theta=\frac{B}{1+\alpha\cdot N} \tag{1}\]In Equation (1), \(B\) represents the total capacity of the buffer, \(\alpha\) represents the DT control parameter, and \(N\) represents the number of active queues in the shared memory switch scenario, which refers to the total number of flows in the buffer in the context of this paper. The original DT considered only one factor, \(N\), which is insufficient to capture the actual resource contention in the reordering buffer. In this paper, we consider three factors that influence the buffer state and redesign the calculation method for the reserved buffer threshold \(\theta\). These three factors are the number of flows receiving reordering services in the buffer, the proportion of persistent high-resource-demanding (PHRD) flows, and the business category of flows. To identify PHRD flows, we first mark those exceeding \(\alpha\cdot\theta\), which represents the ideal buffer space for each flow in a steady state, as suggested in [41]. However, we do not immediately count flows reaching this size, as temporal characteristics must also be considered. For a flow identified by a specific EID, when its size first reaches \(\alpha\cdot\theta\), we mark it and check its status again after a time interval \(T\). If this flow still maintains a size of at least \(\alpha\cdot\theta\), it is classified as a PHRD flow. As the proportion of PHRD flows increases, the reserved buffer should be appropriately enlarged. To account for this factor, we redefine the \(\alpha\cdot N\) term in Equation (1) as the buffer partition coefficient \(\lambda\) and expand it as follows:  
\[\lambda=\frac{\alpha\cdot N}{1+N_{PHRD}} \tag{2}\]  
The persistent high-resource-demanding attribute reflects the traffic characteristics in the buffer and is related to the complexity of packet disorder patterns. The business category, on the other hand, is an inherent property of the traffic. Literature [42] proposes an effective strategy to distinguish between real-time small-scale traffic and non-real-time large-scale data transfer traffic based on packet size, suggesting that traffic classification should be dynamically adjusted by calculating the exponentially weighted moving average of packet sizes. Assuming the size of the incoming packet is _Psize_, the classification threshold _Psize_thresh_ is updated over the time window \(\Delta t\) as follows:  
\[\textit{Psize\_thresh}_{t}=\gamma\cdot\textit{Psize\_thresh}_{t-\Delta t}+(1- \gamma)\cdot\textit{Psize} \tag{3}\]  
By comparing the size of the incoming packets with the threshold, we classify the data flows of the packets as follows:  
\[ \begin{cases}\textit{Psize}\leq\textit{Psize\_thresh},&\text{packet belongs to a real-time, small-scale flow}\\ \textit{Psize}>\textit{Psize\_thresh},&\text{packet belongs to a non-real-time, large-scale flow}\end{cases}  \tag{4}\]  
When the proportion of non-real-time flows in the reordering buffer increases, the reserved buffer size should be appropriately enlarged to prevent data overflow. Conversely, as the proportion of real-time flows rises, the reserved buffer size can be reduced to provide faster reordering services for more flows, accommodating the delay-sensitive nature of these smaller flows.