1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Tài liệu Hiệu suất của hệ thống thông tin máy tính P2 docx

9 690 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Little's law and the M/M/1 queue
Tác giả Boudewijn R. Haverkort
Thể loại Chapter
Năm xuất bản 1998
Định dạng
Số trang 9
Dung lượng 575,03 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Little’s law relates the average number of jobs in a queueing station to the average number of arrivals per time unit and the average time a job spends in a queueing station.. Consider a

Trang 1

Chapter 2

I N Section 2.1 we present Little’s law, a very general law that can be applied in many queueing models Using Little’s law, we are able to study the simplest queueing model, the MIMI1 queueing model, in Section 2.2

2.1 Little’s law

In this section we will introduce the probably most general law in model-based performance evaluation: Little’s law, named after the author who first proved it [186] Its generality lies in the fact that it can be applied almost unconditionally to all queueing models and at many levels of abstraction Its strength furthermore lies in the fact that its form is both intuitively appealing and simple

In Section 2.1.1 we introduce Little’s law and explain it intuitively A more thorough proof is given in Section 2.1.2

Little’s law relates the average number of jobs in a queueing station to the average number

of arrivals per time unit and the average time a job spends in a queueing station

Consider a queueing station as a black box at which on average X jobs per time unit arrive (see Figure 2.1); X is called the arrival rate or the arrival intensity When we assume that jobs are served on a first come-first served basis (FCFS), whenever a job arrives at the queueing station, two things might happen Either the job is immediately served which implies that there are no other jobs in the queueing station, or it has to wait until the jobs already in the queueing station are served before it gets its turn Notice that we do not

Performance of Computer Communication Systems: A Model-Based Approach.

Boudewijn R Haverkort Copyright © 1998 John Wiley & Sons Ltd ISBNs: 0-471-97228-2 (Hardback); 0-470-84192-3 (Electronic)

Trang 2

22 2 Little’s law and the M/Ml1 queue

arrivals service providing departures

>

entity

Figure 2.1: Black box view of a job servicing system assume anything about the distributions of the interarrival and service times; only their means are used! Denote the average time a job spends in the queueing station as E[R] (residence time/ response tirne), and the average number of jobs in the queueing station

as E[N]

Now, suppose that we mark a particular job while observing the queueing station When the marked job enters the queueing system we take a time stamp ti (i for “in”) When the marked job comes out of the queueing station, we take a time stamp t, (o for

“out”) The difference t, - ti will on average be equal to the earlier defined value E[R] However, at the moment the marked job leaves the queueing station, we know that while the job passed through the queueing station, other jobs have arrived How many? Well, since on average there have elapsed E[R] t ime units between the arrival and the departure

of the marked job, on average X x E[R] j o s b h ave arrived after the marked job in that period This number, however, must be equal to the earlied defined value of E[N] This is due to the fact that every job can be a marked job, and hence, the product XE[R] always equals the number of jobs left behind in the queueing station by a departing job, i.e., it can

be interpreted as the average value of the number of jobs in the system As a consequence,

we have

Notice that we have assumed that all jobs that arrive also leave the system after having received service so that no losses of jobs occur and that the system is not overloaded In that case, the arrival rate X equals the throughput of jobs (denoted X) This is normally the case when the system is not overloaded and when there is infinite buffer capacity In case the system is overloaded or when there are finite buffers, customers will be lost, and only the non-lost customers should be taken into account In such cases Little’s law should read E[N] = XE[R] Due to the fact that losses may occur in some systems, X is not always a priori known!

The derivation sketched above can be applied at any desired level of abstraction Sup- pose that we open up the black box and look at it as if it were a queue, followed by the actual server (see Figure 2.2) Then we could still apply Little’s law; however, we could also apply it on the more detailed level of the queue and the server separately, as we will

Trang 3

2.1 Little’s law 23

arrivals

waiting in service

Figure 2.2: The inside view of a job servicing system explain below

At the queue on average X jobs arrive per time unit The time spent in the queue is the waiting time, which on average equals E[W] Applying Little’s law, the average number

of jobs in the queue, E[N,], must be equal to the product of the waiting time and the throughput through the server The latter equals the arrivals at the queue (no jobs are lost in between) and we thus obtain:

When looking solely at the server, we again observe, on average, X job arrivals per time unit, since between the queue and the server no jobs are lost The average time a job spends in the server, i.e.,is being served, is denoted E[S] Then the average number of jobs in the server is given by:

Since we are dealing with a single server, E[N,] can at most be equal to 1 and must at least equal 0 In fact, E[N8] not only indicates the average number of jobs in the server but also the average time the server is busy Therefore, E[N,] is also called the utilisation

there are no losses)

Returning to our overall queueing system, the average number of jobs in the queueing system must be equal to the sum of the average numbers of jobs in the components of the queueing system, i.e., E[N] = E[N,] + E[N,] Applying the earlier derived versions of Little’s law, we obtain

E[N] = E[N,] + E[N,] = XE[W] + XE[S] = X(E[W] + E[S]) = XE[R], (24 which is as expected

There are some important remarks to be made on the generality and use of Little’s law:

l Little’s law expresses a simple relationship between the average values of the through- put, the residence times and the number of jobs in the system;

Trang 4

24 2 Little’s law and the MIMI1 queue

time t

Figure 2.3: Sample evolution of A(t) and D(t)

l No assumptions regarding the involved interarrival- and service-time distributions have to be made;

l Little’s law is valid independently of the scheduling discipline of a queue as well as

of the number of servers;

l As we will see later, with many analysis techniques E[N] can be obtained easily Using Little’s law, measures like E[R] can then be derived;

l Little’s law not only applies to single queueing stations, but also to networks of queueing stations

2.1.2 Proof of Little’s law

After the proof given by Little in 1961 a wide variety of “simple proofs for E[N] = XE[R]” has appeared in the literature In this section we give a proof of Little’s law which indeed is more formal than the intuitive explanation we gave in Section 2.1.1 The presented proof

is valid under the assumption that the queueing system empties infinitely often For a queueing system where the arrival rate of jobs is smaller than the service rate of jobs, this

is the case

As before, we consider the black box view of a queueing system Without loss of generality we start observing the queueing system at time t = 0 Let A(t) denote the number of job arrivals to the queueing system up till time t A similar definition holds for D(t), the number of job departures from the system up to time t Clearly, D(t) 5 A(t)

Trang 5

2.2 The simplest queueing model: the M~lU~l queue 25

When we denote with N(t) the number of jobs in the system at time t, we have N(t) =

A(t) -D(t) I n F’g 1 ure 2.3 we show a possible evolution of A(t) and D(t) We now proceed

to define the following four quantities:

l The average arrival rate at the system up to time t, denoted At, simply is the total number of arrivals up to time t, i.e., A(t), divided by t Thus, we have Xi = A(t)/t,

and At + X if t -+ 00

l The total system time of all jobs, R(t), is exactly the area between the two curves of

A(t) and D(t), i.e.,

R(t) = St N(s)&

a The average time a job spends in the system as observed over the period [0, t) is denoted Rt This quantity, however, is equal to the total system time, i.e., R(t),

divided by the total number of customers having been present in the system, i.e., A(t)

Thus, we have Rt = R(t)/A(t), and Rt -+ E[R] if t + co

l If the total system time of all jobs during [0, t) equals R(t) job-seconds, the average number of jobs in the system up to time t, denoted Nt, equals R(t)/t, and Nt -+ E[N] ift+oo

We now can derive the following relation:

Now, taking the limit as t + 00, we obtain E[N] = XE[R] since At + A, Nt + E[N] and

Rt + E[R] In case the queue is saturated, the number of jobs queued will grow without bound, hence, the expected response time will not be bounded either

2.2 The simplest queueing model: the MIMI1 queue

In this section we make use of Little’s law to evaluate the performance characteristics of the simplest queueing system possible: the MIMI 1 queue

Consider a queueing station where jobs arrive with a negative exponential interarrival time distribution with rate X (mean interarrival time E[A] = l/X) Furthermore, the job service requirements are also negative exponentially distributed with mean E[S] = l/p Such a model typically applies when addressing a telephone exchange: empirical results

Trang 6

26 2 Little’s law and the MIMI1 queue

indeed support the assumptions of negative exponential interarrivals times and service times (call durations)

We first verify whether the utilisation p = X/p < 1, that is, we check whether on average the amount of arriving jobs flowing in per unit of time is smaller than the amount

of jobs that the system is able to handle in unit time If so, the system is stable and we continue our investigations If not, the system is overloaded and an infinite queue will grow; further analysis will not help us any further

We are interested in determining the following mean performance measures for this queueing system: the mean queue length E[N,], the mean number of jobs in the system E[N], the mean waiting time E[W] and the mean response time E[R]

We already know that we can apply Little’s law for the complete queueing station as well as for the queue in isolation, yielding:

WYJ = Jww7 and E[N] = XE[R] P-7)

We furthermore know that E[R] = E[W] + E[S] T o solve for the above four unknown quantities, we have to have one extra relation This relation can be derived from the so- called PASTA property (which will be discussed in detail in Chapter 4) which states that jobs arriving according to a Poisson process (a process where the interarrival times are negative exponentially distributed, as we have here (see also Chapter 3)) see the queueing system upon their arrival as if in equilibrium This means that an arriving job finds, on average, E[N] jobs already in the queueing station upon its arrival, and for which it has

to wait before being served This yields us the following extra equation:

The overall response time of such a customer then consists of two main components: (i) the service time for all customers queued up front; and (ii) its own service time Thus, we have:

We also use the fact here that the service times are negative exponentially distributed since

we assume that the remaining service time of the customer in service at the arrival instance

of the new customer is the same as a normal service time (we also come back to this issue

in Chapter 5) Now, we can use Little’s law to write E[N] = XE[R], so that we find:

E[R] = XE[R]E[S] + E[S] =+ E[R]( 1 - XE[S]) = E[S] (2.10)

Trang 7

2.2 The simplest queueing model: the M 1 M] 1 queue 27

Recognising p = XE[S] and rearranging terms we find

qq = E[Sl

1 -p’

Using the relations we already had, we then find that

E[W] = z, E[N] = &, and E[N,] = -&

(2.11)

(2.12)

There are a number of important conclusions to be drawn from these results First of all, we observe that the mean performance measures of interest grow infinitely large as

p -+ 1 This conforms with our intuition Secondly, we see that the performance measures

of interest do not grow linearly with p; instead they grow with a factor

(2.13)

which is called the stretch factor since it can be interpreted as the factor with which the mean service time E[S] is stretched (multiplied) to yield the mean response time when a server with total utilisation p processes a job with average length E[S]

In Figure 2.4 we present E[R] and E[W] as a function of p Note that E[N] = 1 for

p = 50% (at 50% utilisation, on average, there is one job in the queueing station) and E[W] = E[S] (at 50% utilisation, the mean waiting time equals the mean service time) Consequently, for higher utilisations, the mean response time includes more than 50% of waiting Also observe that the curves start relatively flat but increase quite sharply once above the 50% boundary This is typical for most queueing systems and explains why many computer and communication systems exhibit “all of a sudden” bad performance when the load is only moderately increased

The derivation just given provides us with only the mean values of a number of per- formance measures of interest For some applications, this might be enough However, very often also information on the variance of performance measures is of importance or information on detailed probabilities regarding certain events in the system (e.g., the prob- ability that a buffer contains at least k customers) For these cases a more detailed and intricate analysis of the queueing model is necessary To derive such information, we need

to study the stochastic process underlying the queueing systems In order to be able to do

so we need to study stochastic processes first, which is therefore the topic of Chapter 3

Trang 8

28 2 Little’s law and the MIMI1 queue

lOE[S]

WSI

WSI

7E[Sl

6Jwl

5-wSl

4EPl

WSI

2Jwl

EPI

0

P

Figure 2.4: The mean waiting time E[W] and the mean response time E [R] (measured in E[S]) as a function of p for the M]M(l queueing model

2.3 Further reading

Little’s law was originally presented in 1961 [186] Other proofs of Little’s results can be found in [81, 150, 193, 269, 2701 The analysis of the MIMI1 queue as presented here is an example of the so-called “method of moments” to derive average performance measures; this method has first been presented by Cobham in 1954 [57, 581 Paterok et al discuss its suitability for the derivation of higher moments [230] W e will use the method of moments

at many occasions in the course of this book

2.4 Exercises

2.1 Time-sharing computer systems [adapted from [156]]

Consider a time-sharing computer system that supports K users sitting behind their ter- minals issuing commands The time it takes a single user to interpret an answer from the central computer before a new command is issued is called the think time and takes, on average, E[Z] seconds The computer system can process a command in, on average, E[S] seconds Now assume that there are on average k commands (jobs) being worked upon

by the central computer, hence, there are K - Ic jobs being “processed” by the users; the effective rate at which these users generate new requests for the central computer then

Trang 9

2.4 Exercises 29 equals (K - Ic)/E[Z]

1 Express the expected central computer response time E[R] in terms of K, Ic and E[Z] using Little’s law applied to the central computer

2 Let po equal the probability that the central computer is empty (all jobs are being worked upon by t’he users) The throughput of the central computer can then be expressed as (1 - po)/E[S] Th is can be understood as follows If there would be

an infinite supply of jobs, the computer would on average process one every E[S] units of time, yielding a rate of completion of l/E[S] However, with probability

1 - po there is no job for the computer to work upon, hence its rate of completion

is effectively decreased with that factor Using Little’s law for the terminals, express the expected number of customers in the terminals, i.e., K - k, as a function of po, E[S] and E[Z]

3 Show that the combination of the above expressions yields:

E[R] = E - E[Z]

4 Based on the possible values that p can assume, derive the following lower bound for E[R] thereby taking into account the fact that E[R] cannot be smaller than E[S]:

E[R] > max{KE[S] - E[Z], E[S]}

We will address this and similar models in more detail in Chapter 4 and in Chapters 11 through 13

2.2 MIMI1 queueing

How large can the utilisation in an M]M]l queue be so that the expected response time is

at most n times the expected service time?

Ngày đăng: 15/12/2013, 08:15

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w