You are on page 1of 9

Packet Queues & Delay Analysis

Queuing models offer qualitative insights into the performance of communication networks and quantitative estimations of average packet delay. In many networking instances, a single buffer forms a queue of packets. A single queue of packets is a notion of packet accumulation at a certain router or even at an entire network. In the context of data communication, a queuing buffer is a physical system that stores incoming packets, and a server can be viewed as a switch or a similar mechanism to process and route packets to the desired ports or destinations. A queuing system generally consists of a queuing buffer of various sizes and one or more identical servers. This unit focuses on delay analysis of single queuing units and queuing networks. The following topics are covered: Little's theorem Birth-and-death process Queuing disciplines Markovian FIFO queuing systems ((M/M/1 only)

Littles Theorem
The fundamental concept of packet queuing is based on Little's theorem, or Little's formula. This formula states that for networks reaching steady state, the average number of packets in a system is equal to the product of the average arrival rate, , and the average time spent in the queuing system. N=*T Where N = Avg. no. of packets, = avg. arrival rate, T = avg. time spent in the system

Proof:

If T is large, arrivals = departures = N Arrival rate = Total arrivals/Total time= N/T Hatched areas = total time spent inside the system by all jobs = J Mean time in the system= J/N Mean Number in the system = J/T = J/N *N/T = Arrival rate * Mean time in the system Application: Applying to just the waiting facility of a service center Mean number in the queue = Arrival rate Mean waiting time Similarly, for those currently receiving the service

Mean number in service = Arrival rate Mean service time Example 1: A monitor on a disk server showed that the average time to satisfy an I/O request was 100 milliseconds. The I/O rate was about 100 requests per second. What was the mean number of requests at the disk server? Using Little's law: Mean number in the disk server = Arrival rate Response time = 100 (requests/second) * (0.1 seconds) = 10 requests Example 2: Consider a data-communication system with three transmission lines; packets arrive at three different nodes with arrival rates 1 = 200 packets/sec, 2 = 300 packets/sec, and 3 = 10 packets/sec, respectively. Assume that an average of 50,000 same-size packets float in this system. Find the average delay per packet in the system. N=*T Therefore, T = N / T = 50000 / (200+300+10) = 9.84 secs.

Process
Process: Function of time

Process
Deterministic Stochastic

Stochastic Process
Stochastic Process: Random variables, which are functions of time Example 1: n(t) = number of jobs at the CPU of a computer system Take several identical systems and observe n(t) The number n(t) is a random variable. Can find the probability distribution functions for n(t) at each possible value of t.

Example 2: w(t) = waiting time in a queue Types of Stochastic Processes Discrete or Continuous State Processes Markov Processes Birth-death Processes Poisson Processes

Birth and Death Process


If a packet arrives at or leaves from a queuing node of a computer network, the state of the node's buffer changes, and thus the state of the queue changes as well. In such cases if the system can be expressed by a Markov process, the activity of the processing terms of the number of packet scan be depicted by a state machine known as the Markov chain. A particular instance of a Markov chain is the birth-and-death process. In a birth-and-death process, any given state n can connect only to state n - 1 or to state n + 1. In general, if A(t) and D(t) are the total number of arriving packets and the total number of departing packets, respectively, up to given time t, the total number of packets in the system at time t is described by K(t) = A(t) - D(t). With this analysis, A(t) is the total number of births, and D(t) is the total number of deaths. Therefore, K(t) can be viewed as a birth-and-death process representing the cumulative number of packets in a first-come, first-served service discipline.

A general birth-and-death process and its transition

Queuing Disciplines
Queuing systems are widely described by Kendal's notations as A/B/m/K, where A denotes the distribution of the inter-arrival times; B, the distribution of the service times; m, the number of servers; and K, the total capacity of the system. If a system reaches its full capacity, the arriving packet number K + 1 is blocked away. A and B are normally represented by the following symbols: M Exponential distribution Ek Erlang distribution with k phases Hk Hyper exponential distribution with k phases D Deterministic distribution G General Distribution GI General distribution with independent inter-arrival times MMPP Markov-modulated Poisson process BMAP Batch Markovian arrival process In a queuing system, packets arrive at the buffer and are stored there. If other packets are waiting for service in the queue, the incoming packet is stored as long as all other packets are ahead of it. Thus, a server state can be either idle or busy. When a currently in-service packet departs from the system, one of the stored packets is selected for service according to the scheduling discipline. A commonly used arriving process assumes that the sequence of interarrival times is independent and identically distributed (IID).

Queuing systems can be classified as follows: 1. Static Queue Discipline First come, first served (FCFS). Packets are served in the order they arrive. Last come, first served (LCFS). Packets are served in reverse order of their arrival. 2. Dynamic Queue Discipline Random service. Packets are selected at random for service. Priority service. The selection of a packet in the queue depends on priorities that are locally or permanently assigned to the packet. Priority Queuing Discipline

Preemption. The packet currently being serviced can be interrupted and preempted if a packet in the queue has a higher priority. Round robin. If the time allowed for the service of a packet is through and the process is not finished, the packet returns to the queue, and the action is repeated until the job service is completed. Service sharing. Servers can share their power with one another to provide services to the packets requiring more processing time

M/M/1 Queuing Model


The following figure shows a simple queuing system model. Packets arrive according to a Poisson model at rate so the inter-arrival times are IID exponential random variables with mean 1/. When the server is prepared for service, packets from the queue enter the server. Consider the situation in which the service times are IID exponential random variables with mean 1/ and the inter-arrival and service times are independent. With the M/M/1 model, it is in fact assumed that the system can accommodate an unlimited number of packets.

Assumptions: Exponential distribution of inter arrival times or Poisson distribution of arrival rate. Single waiting line with no restriction on length of queue. Queue discipline is FCFS. Single server with exponential distribution of service times.

Derivation:

(a)

(b)

Pk = Pk+1 P0 = P1 P1 = P2 Pk = k P0 / k = k P0 ( = / ) = 1 (Since all probabilities sum to 1)

: Arrival rate (mean) of customers (jobs) [packets on input link)] : Service rate (mean) of the server [output link]

Solving Ws, Wq and Lq: =/ Pn = (1- ) Ls = / (1- ) Ls = Lq + / Ls = * Ws Lq = * Wq For stability, mean arrival rate must be less than mean service rate Utility factor = / < 1 Ls: average number in queuing system (waiting and in service) Lq: average number in the queue (queue length) Ws: average waiting time in system (waiting and in service) Wq: average waiting time in the queue Example: Consider a link to which packets arrive as a Poisson process at a rate of 300 packets/sec such that the time taken to service a packet is exponentially distributed. Suppose that the mean packet length is 500 bytes, and that the link capacity is 1.5 Mbps. What is the probability that the links queue has 1, 2 and 10 packets respectively?

The packet length is 500 bytes = 4000 bits, so that the link service rate of 1,500,000 bits/sec = 375 packets/sec. Therefore, the utilization is 300/375 = 0.8. When the link queue has 1 packet, it is in state j=2, because one packet is being served at that time. Thus, we need P2 = 0.82* 0.2 = 0.128. For the queue having two packets, we compute P3 = 0.83* 0.2 = 0.1. For 10 packets in the queue, we compute P11 = 0.811* 0.2 = 0.017 a fairly small quantity. Thus, even when the utilization is high (80%), the queue size is quite small, rarely exceeding 10 packets.

References
Computer and Communication Networks - By Nader F. Mir ACN Unit 07 Slides - By Prof. PIntu Shah

You might also like