Queuing Laws


Little's Law


The total number of tasks processed by a server at each time interval (t) during an observation period (T) provides the total amount of waiting and processing time for all tasks during (T). The measurement of completed tasks (C), an observation period (T), as well as accumulated waiting time (W) during (T) lead to the following calculations.
  1. The mean response time for a completed task, measured in a unit of time
R = W/C
  1. The mean number of tasks at a server
n = W/T
  1. The throughput of a server
X = C/T
Multiplying mean response time by throughput results in the mean number of tasks at the server, or the mean queue length of the server.
W/C x C/T = W/T
Little's Law is the relation

n(i) = R(i) x X(i) , where i identifies the server.
In case of peas
Num of users = TPS(X) x Resp time(R)
Deviation of 15% is acceptable in the calculations. Refer document: \\peas\documents\PEAS\Engine\Body of Knowledge\Perf_Repository_KT_By_ARUN\Documents\Performance tuning overview.pptx

Utilization Law



The Utilization law deals with the system as a black box and derives the condition for the requests coming in at a particular time interval and the time when the server was busy
During a period of time (T), tasks arrive at a server, the server processes them, and completed tasks leave the server. Let us define few terms
  1. The number of tasks arriving at the server during T, as A
  2. The amount of time, during T, that the server is busy processing tasks B
  3. The number of tasks completed during T, as C
These measurements result in the following calculations
  1. The service demand or the service requirement per request is the time taken by server (at full utilization) per request completed.
S = B/C
  1. The throughput is defined as the number of the request catered coming per unit time which  measured in tasks per unit of time is
X = C/T
3.    The utilization is defined as the ratio of the time system was busy to the total available time. Hence U, the utilization is
U = B/T
Multiplying mean service time by output rate results in the utilization of the server
B/C x C/T = B/T
The utilization law is
U(i) = X(i) x S(i) , where i identifies the server.

 

Forced Flow Law


A transaction flows through a system of servers. A transaction may have several tasks completed by a server before it leaves the system. A server completes a task in the transaction each time the transaction is at the server.
During an observation period (T), an observer can obtain
  1. The number of transactions completed by the system (C(0))
  2. The number of tasks completed by server i, (C(i))
These measurements support the following calculations
  1. The average number of tasks per transaction for server i, which is called the visit ratio of the server
V(i) = C(i)/C(0)
  1. The average number of transactions completed by the system during (T), which is the system throughput
X(0) = C(0)/T
  1. The average number of tasks completed by server i during (T), of the server throughput
X(i) = C(i)/T
Multiplying the system throughput by the visit ration of a server gives the throughput of the server
C(i)/C(0) x C(0)/T = C(i)/T
The forced flow law is
X(i) = V(i) x X(0)


No comments:

Post a Comment