In this section, we focus on CBS shaping benefit analysis from Network Calculus perspective. The consideration of using network calculus mainly comes from its convenience of modeling flow maximal burst. Indeed, a bigger idleslope setting could bring larger flow burst as a looser flow control mechanism. This kind of enlarging flow burst might be the potential factor for different shaping benefit. Firstly, we will carry on the study about flow maximal burst and propose a method to measure its equivalent logical maximum, which considers the actual arrival behavior of frames with serialization effect. Secondly, by using integral operation, the detailed shaping benefits are fitted according to the changing of flow burst.
5.4.1. Maximal Burst Analysis
The basic concept of Network Calculus can be found in
Appendix B. According to its theory,
R is used to define one flow, and
R(
t) is the value of the flow at time
t. When flow
R is scheduled out from an output port after entering into the backbone of a switched network, its equal departure burst will become fuzzier and larger, and this kind of burst enlargement can lead to a further uncertain of flow’s arrival in the following switches. The enlargement burst can be calculated according to Equation (5) if flow
R strictly obeys the leaky bucket flow model [
39].
where α(
t) is the arrival curve for flow
R and α
*(
t) is the arrival curve for the corresponding output flow
R*;
is the burst on arrival and
is the burst after departure;
is flow constant bit rate; and
is the worst-case delay of flow
R in the current output port.
Furthermore, if a
shaper is adopted to shape this flow, the corresponding output flow
R* would also be restricted within an envelope defined by the shaper during a period of time ∆
t:
In other words, the departure burst is limited by the shaper and the arrival curve α
*(
t) for
R* is restricted by:
Equation (7) shows the flow control mechanism by a shaper from the burst aspect. It limits the maximum flow burst for the next switch. In other words, if a shaper is applied to a flow, its burst will be limited within a scope, which perhaps could bring some benefits to other flows. By using Equation (7), the expression of α(t) and α*(t) as well as the worst-case delay at any output port along flow paths can be calculated.
The CBS algorithm in Ethernet-AVB plays the role in flow shaping. Considering the worst-case scheduling scenario for SR-A, the maximum block for SR-A is expected as the synchronous arrival of a lower priority frame with the longest frame length. Though SR-A has the highest priority, it cannot break the current frame transmission even with lower priority. In
Figure 2, the first coming BE frame occupies the transmission chance in the physical link, then the next coming SR-A frames have to wait for the end of BE transmission. Thus, the maximum blocking time for SR-A is bounded by:
where
is the maximum frame length for SR-B,
is the maximum frame length for BE and
C is the link speed.
During the blocking time
TA, SR-A gains the credit up to
[
30], which is the highest reachable credit for SR-A. The lowest reachable credit for SR-A is
[
30] only when SR-A credit is just consumed from zero with the sending behavior of a SR-A frame assigned as the maximal frame length
. Thus, the longest continuous transmission time for SR-A can be obtained. It depends on the time interval when SR-A credit decreases from the highest credit to the lowest one with a rate of
sendSlopeA as:
According to Equation (9), the maximum amount of bits that can be transmitted back-to-back for SR-A is:
Equation (10) gives the maximal continuous sending bits during the worst-case queuing scenario for SR-A, and it also matches with the result shown in [
29], in which the author explains it is the maximal permitted burst tolerance for SR-A flows.
In [
30], the authors rethink the shaping process according to min-plus theory and deduce the detailed expressions for AVB SR shapers. For SR-A, the shaper curve [
30] is:
Letting
t = 0 can obtain the initial maximal permitted burst
as:
In other words,
is the initial value of the shaper curve for SR-A according to Equation (11) when time
t is set to zero. In fact, it can also be got from
. If we consider the maximum amount of bits transmitted back-to-back could be the sum of the initial maximal permitted burst plus the bits which can be accumulated during the time interval of the maximal transmission windows, the initial maximal permitted burst
for SR-A can be got from:
According to the definitions of
and
,
can be further deduced as:
Thus, the initial maximal permitted burst
according to Equation (11) in [
30] can also be obtained from the maximum amount of bits
.
Figure 11a shows the relationship between
and
.
Equation (12) gives the initial maximal permitted burst according to the definition of shaping function from min-plus theory perspective, but it does not consider the actual arrival behavior of frames, as well as the serialization effect which has been used to tighten the upper bound of flow end-to-end delay typically. In fact, the flow with the maximal frame length constitutes the initial maximum burst among the flows sharing the same physical link when they flow into the next switch together. Adopting a similar method mentioned in [
37], the arrival curve for the coming serialized flows (grouped flows) should begin from one maximal frame length with the rate as the link speed, then it will be restricted by the CBS logical bandwidth; at last, it keeps increasing according to its long term constant bit rate. For the CBS shaper, the shaping envelope should also start from the corresponding one maximal frame length. Under this consideration, we can define a new burst
to descript this kind of shaping features.
is used to represent the equivalent maximum burst of SR-A, which considers the fact that the frame with the maximal frame length has already arrived at the output port and been selected out to cause the initial maximum burst. Thus, the following accumulated maximal flow bits should be less than
. Then, we can get
as:
In Equation (15), the subtraction of from considers has arrived at the output port. Compared to and , our considers the actual arrival behavior of frames with serialization effect and shows the equivalent logical maximum of bursts.
According to the subtraction operation in Equation (15), the shaping envelope with serialization effect for SR-A CBS can also be obtained by moving the ordinate in
Figure 9a a specific length to the right as
, which is shown in
Figure 11b. The initial value of the moved shaper curve is our equivalent maximum burst
. In
Figure 11b, the
C speed line starts from
. The time of the crossing point between
C speed line and
idleslopeA line is
since it already has one frame ready.
Focused on SR-B CBS shaping function, we can adopt the same way to obtain the maximum amount of bits transmitted back-to-back
, the maximal permitted burst
and the equivalent maximal burst
. To achieve this purpose, the maximum blocking time for SR-B should be calculated first, which seriously depends on the worst-case scheduling scenario. As the priority of SR-A is higher than SR-B, the longest burst transmission of SR-A flows is expected to constitute the worst-case scheduling scenario for SR-B flows. Thus, for SR-B the worst-case blocking occurs at the end of the transmissions of a BE frame plus the possibly maximum numbers of SR-A frames with the corresponding maximal frame length, so it is bounded by:
The highest and lowest reachable credits for SR-B can be got according to the same way for SR-A analysis, which are
and
. With these results, the longest continuous transmission time for SR-B can also be obtained.
Thus, the maximum amount of bits that can be transmitted back-to-back for SR-B is:
For the initially maximal permitted burst
, it obeys a similar restriction, as shown in Equation (13), and can be further calculated as:
With the expression of
, our equivalent maximal burst
can be deduced out. It also considers the fact that the initial maximum burst of SR-B comes from the frame with the maximal frame length.
5.4.2. Shaping Benefit Computing
According to the discussion above, the burst restriction by CBS shapers could bring benefit to other priority flows as a tighter burst restriction often means more transmission opportunities for others. Besides that, the extra bandwidth reserving than the strictly necessary also plays a role on the final benefit. In fact, it can be seen as an amplifier during the benefit computing.
Considering an actual output port with CBS algorithm, different priority flows share the common bandwidth, such as
C = 100 Mbps, with different
idleslope settings. Focused on the shaping benefit from SR-A to SR-B, the maximum amount of bits that are transmitted back-to-back for SR-A can all be responsible for the delay to SR-B flows since it has the highest priority and constitutes the actually maximal blocking for SR-B flows. If the
idleslopeA setting varies, the change of the maximum transmission amount can be calculated according to Equation (10), such as the decrease of
idleslopeA from 10 Mbps to 5 Mbps at the port from SF to SB can result in a burst reduction as 90.18 bytes. Supposing the shaping benefit mainly comes from the burst reduction of SR-A, it can be calculated as:
The result shown in Equation (21) is quite rough since it only considers the change of the maximum burst. A more accurate computing method should investigate the cumulative process of shaping benefit during the varying scope of idleslopeA setting.
According to Equation (10), any little variation of
idleslopeA could cause a burst change. It can be approached from the first-order derivative of Equation (10) as:
When
is used to calculate the shaping benefit, it will be amplified by bandwidth reservation margin of SR-A. The amplifying computing is based on the scale effect of bandwidth. A bigger bandwidth margin always means larger space for SR-A CBS performs. Letting
bandA represent the actual bandwidth occupation by SR-A flows, the bandwidth margin can be normalized as
. Supposing the shaping benefit from SR-A is positively associated with its bandwidth margin, any little burst change of SR-A finally results in a benefit to SR-B as:
where
K is a balance coefficient with an expectation value as
and
is to change the burst into delay time. In the expression of
K,
bandAll represents the total bandwidth occupation by all priority flows, including SR-A flows, SR-B flows and BE flows. Parameter
K reflects the bandwidth margin for all flows. Similar as the scale effect of SR-A bandwidth margin, a bigger value of
K always means a larger margin for all flows, and it would permit more space for CBS shaping function performing, then finally, it could potentially bring a bigger benefit expectation. The exponentiation operation indicates its linear strength during the variation of
bandAll.
Compared to the calculation method shown in Equation (21), Equation (23) gives the differential form of shaping benefit from SR-A and counts the effect of bandwidth margin. Through integral operation, the detailed value of benefit can be got as:
For the shaping benefit from SR-B to SR-A, the maximum amount of SR-B flows that are transmitted back-to-back cannot all be used to postpone the transmission of SR-A flows. However, a large amount of continuous SR-B flows have great possibility to cause uneven concentrating regions, and this regions can be logically measured by the equivalent logical maximum of bursts as
, which could finally affect the transmission of high priority flows. Adopting the same way for SR-A shaping benefit analysis, the differential form of SR-B equivalent logical maximum of bursts is:
Thus, the shaping benefit from SR-B to SR-A is:
In Equation (26),
bandB is used to represent the actual bandwidth occupation by SR-B flows. According to Equations (24) and (26), the shaping benefits from CBS can be calculated and the results are shown in
Table 5 and
Table 6.
Table 5 shows the shaping benefits from SR-A to SR-B according to Equation (24), and
Table 6 shows the shaping benefits from SR-B to SR-A according to Equation (26). For contrast, the simulation results are also given in
Table 5 and
Table 6. These simulation results come from the statistical data shown in
Figure 9 in
Section 5.1. All these results are based on the average delay, not the maximal one. For example, for flow CS
RearC→TV under SR-A evaluation case in
Figure 9b, the reduction value of delays between the curve of
idleslopeB(SB→SF) = 65 Mbps and curve of
idleslopeB(SB→SF) = 35 Mbps at point of 25 Mbps for
idleslopeA(SB→SF) is 15 µs. This difference only comes from the different settings of
idleslopeB, thus, it can be seen as the shaping benefit from SR-B to SR-A. For contrast, the calculated benefit is 12.2 µs by Equation (26).
According to the data in
Table 5 and
Table 6, the calculated shaping benefits match well with the simulation results. For flow VS
RearC→HU and VS
RearC→TV, the shaping benefits from SR-A are no more than 2 µs according to the simulation experiments, and the analytic values are also limited into 2 µs. If the priorities of CS flows and VS flows are exchanged, the analytic values still follow the simulation results and reflect the changing of the maximal burst. Focused on the shaping benefits from SR-B, the analytic method also achieves a good prediction effect.
Besides, it is a good way for the analytic method to explain the varying trend of CBS shaping benefits. According to Equations (10) and (24), the maximal transmitted bits amount
and the shaping benefit
have no direct relationship with SR-B
idleslopeB. Thus, the shaping benefits for flow CS
FC→TV (priority swapped) at different
idleslopeB settings from
idleslopeA = 65 Mbps to
idleslopeA = 55 Mbps nearly keep the same, which are shown in
Figure 9e. In addition, the differences among different shaping benefits for flow CS
RearC→HU (priority swapped) at different
idleslopeB settings between the curve of
idleslopeA = 65 Mbps and the curve of
idleslopeA = 35 Mbps basically hold a similar gap shown in
Figure 9f. This kind of varying trend is quite different from the shaping benefit from SR-B to SR-A, as shown in
Figure 9a,b. We can observe that the benefit differences get bigger with the increase of
idleslopeA setting. In fact, both the equivalent logical maximum of bursts
and the shaping benefit
are directly related with
idleslopeA setting according to Equations (20) and (26). A bigger
idleslopeA will bring a larger
and consequently results in a bigger burst incremental and this incremental finally constitutes the increasing gap trend among different
idleslopeB curves.