Transient Behaviour of a Network Router

The broader use of Software Defined Network (SDN) controllers creates periodic changes in topology and traffic rates at routers that adapt the network to changes in network conditions. Thus the transient behaviour of network components, and in particular routers, is becoming of great interest. Since standard queueing models are difficult to analyze under time-varying conditions, we propose a tractable diffusion approximation for both the transient and steady-state behaviour of a network router. In particular, the analysis provides the steady-state and transient delay and packet loss probability as a function of traffic load and other characteristics. Using these results, we show that when SDN routers change the paths of flows frequently, the network’s behaviour may often be far from its steady-state behaviour. Therefore any network optimization conducted with the help of SDN should not be based on steady-state behaviour, but rather on some metrics related to the time-dependent network behaviour.

Abstract-The broader use of Software Defined Network (SDN) controllers creates periodic changes in topology and traffic rates at routers that adapt the network to changes in network conditions. Thus the transient behaviour of network components, and in particular routers, is becoming of great interest. Since standard queueing models are difficult to analyze under time-varying conditions, we propose a tractable diffusion approximation for both the transient and steady-state behaviour of a network router. In particular, the analysis provides the steady-state and transient delay and packet loss probability as a function of traffic load and other characteristics. Using these results, we show that when SDN routers change the paths of flows frequently, the network's behaviour may often be far from its steady-state behaviour. Therefore any network optimization conducted with the help of SDN should not be based on steady-state behaviour, but rather on some metric reated to the network time dependent behaviour.
Index Terms-Network Routers, Internet Traffic, Quality of Service (QoS), Diffusion Approximation

I. INTRODUCTION
The large scale deployment of the IoT [1] together with Cloud Services [2], where measured data from sensors is transported to the cloud for decision making and the control of cyber-physical systems, has increased the complexity and challenges of traditional networks that must now ensure better security [3] of the traffic flows, acceptable quality of service, flexible network management, and energy optimization [4]. The introduction of artificial intelligence into network routing and management [5], [6] also provides greater variability in the flows that traverse the network. Besides, the decoupling of the data plane, the control plane and the application plane through Software Defined Networks (SDN) [7] gives carriers, service providers and enterprises more significant control over the way traffic moves around networks [8], [9] and simplifies network operation, management and administration. However, it imposes frequent updates of network paths and of the traffic levels that are carried by the routers, so that the transient behaviour of routers and network components becomes of great interest [10].
Recent studies have analyzed SDN networks to optimize steady-state performance using queueing [11], [12], [13], [14], [15], [16], [17] and network calculus [18], [19], [20]. Although This research was supported by the SerIoT Research and Innovation Action, funded by the European Commission (EC) under the H2020-IOT-2017 Program, Grant Agreement 780139. The EC's support does not constitute an endorsement of this paper, which reflects the views only of the authors. these issues require the analysis of the transient behaviour of a router, the usual tools for network performance are not well adapted to this requirement since the transient analysis of queueing network models is particularly difficult, and the discrete event simulation of the transient behaviour of networks is very time-consuming due to the large number of randomized repetitions that are needed to achieve a reasonable level of statistical accuracy. Therefore, in this paper we address the time-dependent behaviour of a router using a diffusion approximation which offers two essential advantages: packet interarrival and service times distributions do not depend on the usual "Poisson and exponential" assumptions, and they lead to computationally efficient results concerning the system's transient behaviour. Let us note that diffusion predictions have been included in patented industrial telecommunication systems [21], [22]. Additionally, the diffusion model only requires the first two moments of the interararival and service times, so that relatively realistic parameters can be based on measured traffic data, and it provides numerical results which are difficult to obtain with other techniques [23]. Thus, the approach we take in this paper allows us to predict the time it takes for a router to reach its new steady-state after the input traffic rates change, and to compute the packet loss probabilities in cases when they may be very small and hard to obtain by simulation.

II. DIFFUSION MODEL OF A ROUTER
We consider the simplified architecture of a router shown in Figure 1. One of the issues in the design of router architectures is the allocation of buffering resources [24].
When a packet arrives at the input port of a router, it is stored temporally, provided it cannot be scheduled immediately for processing. An Arbiter then removes the packet from the input queue and stores it temporally in an internal Packet Buffer while a copy of the header is sent to the Parser. The Parser extracts the header fields and creates a tuple which contains packet forwarding information and sends it to the Flow Match Unit which uses this information to look up the flow tables to match an entry [25]. If the match fails, the router fires off a packet-in message containing the full packet or its buffer ID to the connected SDN controller [26]. Otherwise, the packet is dropped. However, if a matching entry is found for the packet in the flow table, the flow rules installed by the controller are applied, and the packet is removed from the internal Packet Buffer and forwarded through the back plane.
The input buffers and the Arbiter constitute the input queueing system, the internal Packet Buffers and the OpenFlow (OF) processing constitute the internal Packet Buffer queueing system and the output queues, buffers and transmitter constitute the output queueing system. We assume that the Arbiter is running at a faster speed (Gbps), such that there is little or no queueing at the input buffers and that for high-speed links, we have negligible queueing at the output queues. Therefore, the queueing model representation of the SDN forwarding node is composed of a single internal Packet Buffer queueing system.
Let p be the probability that the router's flow table does not contain the installed flow rule for a given arriving packet; it can happen because all the routers controlled by the same SDN controller are not updated in a synchronized manner. The absence of a flow forwarding rule for the arriving packet in the flow table will be discovered after the all K flow table entries have been checked, i.e. after time KT , where T is the time to check each flow table entry. Therefore with probability p the service time is constant, with zero variance. On the other hand, with probability (1 − p), if the flow matching rule for the packet exists in the router, it is in one of the K flow tables entries, and the time to find it is the time spent checking each flow table entry until the proper one is found. The distribution of this time is discrete uniform between T and KT , with mean (K +1)T /2 and variance (K 2 −1)T 2 /12, unless a more sophisticated search data structure is implemented (in which case the search time may be proportional to the logarithm of table size).
When a flow matching rule for a packet is found, the packet is sent to the appropriate output port for forwarding. The number of data packet frames transmitted per second depends on the transmission rate or speed and the distribution of the size of IP packets. For high transmission speeds, which is usual in core network routers, the delay in output ports may be negligible. This way the queueing model of the node is reduced to the model of the Packet Buffer. Since the buffer is of finite capacity N , we will use a finite capacity diffusion approximation model type G/G/1/N where a discrete-state process {M (t), t ≥ 0} of the number of customers in the queue is replaced by an appropriate continuous diffusion process, {X(t), t ≥ 0}. Its incremental changes dX(t) = X(t + dt) − X(t) are normally distributed with mean βdt and variance αdt, where β, α are coefficients of the diffusion equation. For the process M (t) the changes at ∆T have mean (λ − µ)∆T and variance (λ 3 σ 2 ∆T where 1/λ, 1/µ are mean values of interarrival and service times distributions, σ 2 A , σ 2 B are their variances, and C 2 A , C 2 B their squared coefficinces of variation. Therefore it is assumend β = λ − µ and α = λC 2 A + µC 2 B . Since the queue size must be positive, boundary conditions such as absorbing [27], reflecting [28] or elementary return barriers [29] are commonly used to constraint the diffusion process to the positive x-axis. Because of the finite capacity limited to N , the diffusion process should be limited to the [0, N ] interval. Therefore, the diffusion approximation model with elementary return barriers at x = 0 and x = N is used [30]: where δ(x) is Dirac delta function.

A. Steady State Delay
In steady state, when lim t→∞ p 0 (t) = p 0 , lim t→∞ p N (t) = p N , lim t→∞ f (x, t; x 0 ) = f (x), Eqs.(1) become ordinary differential ones and their solution, for = λ/µ, ρ < 1, can be expressed as [29]: where z = 2β α , and the probability p 0 of empty buffer as well as the probability p N of full buffer , i.e. packet tail dropping probability, are determined through normalization The values p 0 , f (1), f (2), . . . , f (N − 1), p N determine the distribution of the number of packets in the Packet Buffer. Figure 2 presents typical solutions f (x) when we vary the parameter and Figure 3 displays the packet loss probabilities p(N ) as a function of . When the utilization is over 80%, the To determine the delay distribution, we will use the notion of the first passage time which corresponds to the queueing time.
The probability density fuction φ(x, t; x 0 ) for a diffusion process that starts at t = 0 from x = x 0 (initial queue size seen by an arriving packet when it joins the queue) and ends when it attains the absorbing barrier at x = 0 is [27] φ(x, t; The density function of first passage time from x = x 0 to and after normalization of γ x0,0 (t) for β < 0 we have and the probability density function (PDF) of the first passage time of the diffusion process from x = x 0 to x = 0, for β < 0 is Suppose that a newly arrived packet sees x packets with density f (x) given by Eq. (2), then the density of the delay is Figure 5 presents the PDF f T (t) of the delay for a few values of utilization .

B. Transient delay modeling
In the case of steady-state analysis, the first two moments of the interarrival and service times used to calculate the diffusion parameters are constant. However, due to the unpredictable characteristics of user traffic and the use of adaptive routing protocols such as the self-aware routing protocol used in SerIoT SDN core network, the characteristics of the traffic arriving at the input and output buffers are dynamic. It requires the transient delay analysis within short time intervals, where the diffusion parameters are constant only with these interval time interval.
Consider a diffusion process with two absorbing barriers at x = 0 and x = N , that started at t = 0 from x = x 0 and that its probability density function φ(x, t; x 0 ) has the following form [27] φ(x, t; , Suppose that the diffusion process starts at point ξ with PDF ψ(ξ), ξ ∈ (0, N ), lim ξ→0 ψ(ξ) = lim ξ→N ψ(ξ) = 0, then the PDF of the process has the form The Laplace transform of φ(x, t; x 0 ) can be expressed as .
Since the transient solution of equation (1) is not analytically tractable, the probability density function f (x, t; ψ) of the diffusion approximation process with elementary returns boundaries can be obtained numerically. It is composed of the function φ(x, t; ψ), which is the probability density function of the diffusion process with absorbing barriers at x = 0 and x = N and the functions φ(x, t − τ ; 1) and φ(x, t − τ ; N − 1) which are probability density functions of the diffusion processes that started at time τ < t at points x = 1 and x = N −1 with densities g 1 (τ ) and g N −1 (τ ) with instantaneous jumps [32][33] [34] f (x, t; ψ) = φ(x, t; ψ) The densities g 1 (t) and g N (t) may be expressed with the use of functions γ 0 (t) and γ N (t): where l 0 (x), l N (x) are the densities of sojourn times at x = 0 and x = N respectively, while γ 0 (t) and γ N (t) are the probability densities that at time t the process enters to x = 0 or x = N are where γ 1,0 (t), γ 1,N (t), γ N −1,0 (t), γ N −1,N (t) are densities of the first passage time between corresponding points, e.g.
and for absorbing barriers, ∂φ(x,t;1) ∂x . The functions γ ψ,0 (t), γ ψ,N (t) denote the probability densities that the initial process that started at t = 0 at the point ξ with density ψ(ξ) will end at time t by entering respectively x = 0 or x = N .
The Laplace transform of the density function f (x, t; ψ) is f (x, s; ψ) =φ(x, s; ψ) +ḡ 1 (s)φ(x, s; 1) (16) +ḡ N −1 (s)φ(x, s; N − 1), and the densitiesḡ 1 (s),ḡ N −1 (s) are obtained from (13), (14), (15) after their Laplace transform. The probabilities that at time t the process has the value x = 0 or x = N arē The above solution gives the transient distribution of the queue length and the transient probability of packet losses when the buffer is full. The original functions of the Laplace transforms can be obtained numerically using Stehfest's algorithm [35], valid for constant diffusion parameters, i.e. constant traffic intensity λ. Therefore it is used for time intervals within which parameters are constant and the solution at the end of such interval serves as the initial condition, i.e. function ψ(ξ)  in (9) in the next interval with different parameters. The mean queueing delay was determined with the use of Little's formula but the first passage time approach is also possible.

III. NUMERICAL EXAMPLES
Based on the previous analysis, we have examined the effect of changes in the levels of arriving traffic rates to a router which may result from path changes created by SDN controllers. We have assumed that the router's packet buffer is partitioned into N = 100 packet sections where each section is reserved for a given active packet flow. When a packet arrives to the buffer, the time it takes to scan the table that contains the list of flows is assumed to be uniformly distributed with average value S = 0.038ms and squared coefficient of variation is 0.33; though these values will vary with the router hardware, they are compatible with those of existing equipment.
In Figure 6 the arriving traffic rates of a given flow vary in the range of 500 to 2500 packets per second, and the traffic level λ changes approximately every 100ms reflecting relatively frequent path changes. We notice that, while at low traffic values the mean delay of a packet closely matches the steady-state value which is reached rapidly, at high values the mean delay always remains in its transient state so that the steady-state value is a poor predictor of the actual delay experienced by packets. Similar results, for another sequence of changes in traffic arrival rate, are shown in Figure 7, where the time-dependent mean packet delay is plotted against the queue utilisation ρ = λS. Confirming the results of the previous figure, we see here too that as ρ increases, the mean packet delay through the router never actually attains its steady-state value.

IV. CONCLUSIONS
Networks that are controlled by SDN are subject to frequent changes in network state as the SDN controller modifies paths in the network so as to optimize Quality of Service, Security or Energy Consumption. These frequent changes may imply that rather than running at a steady-state regime, the network will mostly find itself in transitory states. Diffusions approximations are far more convenient for the transient analysis of service systems, rather than queueing networks and discrete event simulation. Therefore we examine the transient behaviour of a network router with a diffusion approximation model to evaluate both the transient and steady-state performance of a network router, in order to predict packet delay through the router, and its packet loss probability.
The diffusion approximation shows that the transitory behaviour of each router depends on the load which results from the arrival rate of packets and the service process for each packet leaving the router. The service process in turn depends on the number of flows that the router handles because a possibly large flow table has to be searched to determine each incoming packet's outgoing link [17]. Thus our model also takes into account the dependence of the service time for each outgoing packet on the size of the flow table.
Our analysis allows us to predict the time dependent behaviour of important performance metrics such as the mean delay experienced by a packet at the router, the packet queue length for each flow, and the packet loss probability. It also shows that the time dependent behaviour tends much more slowly to its steady-state when the system is more heavily loaded. Numerical examples based on the analysis are also presented to illustrate these insights.
As a consequence of our analyis we see that future work should consider SDN based network optimization techniques that focus both on the transient and steady-state behaviour, because the steady-state may not be attained in many cases.
Future work should also compare these theoretical results with measurements and investigate the performance implications of the detailed interaction of SDN controllers with their connected routers. In addition, we hope to use diffusion approximations to evaluate the performance of networks or systems where the objective of the controls is to optimize the performance of the system [36].