+ All Categories
Home > Documents > 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

Date post: 19-Dec-2015
Category:
View: 218 times
Download: 2 times
Share this document with a friend
Popular Tags:
36
1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.
Transcript
Page 1: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

1

Part II

Web Performance Modeling: basic concepts

© 1998 Menascé & Almeida. All Rights Reserved.

Page 2: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

2

Learning Objectives (1)

• Introduce basic queuing concepts and notation.

• Present communication-processing delay diagrams.

• Discuss examples of service times and service demands.

Page 3: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

3

Learning Objectives (2)

• Discuss operational analysis:• utilization law

• forced flow law

• service demand law

• Little’s law

• Present examples that show the use of operational analysis to model Web performance

Page 4: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

4

Basic Queuing Concepts

• Line

Page 5: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

5

Basic Queuing Concepts

• Waiting time

Page 6: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

6

Basic Queuing Concepts

• Service time

Page 7: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

7

A Resource and its Queue

Resource iLINE

Customers

Wi

Si

Si : service time

Wi : waiting time

resource: CPU, disk, network, etc.

Page 8: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

8

Queuing Basic Concepts

• Total time spent by a request during the jth visit to a resource i:

– Service time (Sij): period of time a request is

receiving service from resource i, such as CPU or disk.

– Waiting time (Wij): the time spent by a request

waiting access to resource i

Page 9: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

9

Communication-Processing Delay Diagram

Rr

S1ccpu

S2ccpu

Client C LAN Server S

W1scpu

S1scpu

W1sio

W2scpu

S2scpu

S1sio

Page 10: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

10

Basic Queuing Concepts

• Service Demand (Di) is the sum of all service times for a request at resource i

Dscpu = S1scpu + S2

scpu

• Queuing Time (Qi) is the sum of all waiting times for a request at resource i

Qscpu = W1scpu + W2

scpu

Page 11: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

11

Basic Queuing Concepts

• Residence Time (R’i) at resource i is the sum of service demand plus queuing time.

R’i = Qi + Di

• Response time (Rr) of a request r is the sum of that request’s residence time at all resources.

Rserver = R’cpu + R’disk

Page 12: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

12

A C/S System: example

• Consider that a transaction t in a C/S system uses 5 msec of CPU at the browser, 10 msec of CPU at the server, and reads ten 2048-byte blocks from the server’s disk.

• The average seek time at the disk is 9 msec, the average latency is 4.17 msec and the transfer rate is 20 MB/sec.

• Consider that the client and server are connected by a 10 Mbps Ethernet and that a request going from the client to the server takes a full packet (1,518 bytes) and the reply requires 7 packets.

Page 13: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

13

A C/S System: solution

• What is the minimum response time?

Rr Dclient + Dnetwork + Dserver

• we are ignoring all waiting times.

Page 14: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

14

Calculating the Service Demands (1)

• At the client

– Dclient = Dccpu = 5 msec

• At the network

– Dnetwork = (m1 + 7m2) / B

• m1 = m2 = 1,518 bytes

• B = 10 Mbps

– Dnetwork = 0.0097 msec

Page 15: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

15

Calculating the Server’s Service Demands (2)

• Dserver = Dcpu + Ddisk

• Ddisk = 10 * Sdisk

Sdisk = AvgSeek + AvgLatency + TransferTime

= 0.009 + 0.0047 + 2,048/20,000,000 = 0.0133 sec

Ddisk = 10 * Sdisk = 0.133 sec

• Dcpu = 0.010 sec

• Dserver = 0.143 sec

Page 16: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

16

A C/S System: solution

• What is the minimum response time?

Rr Dclient + Dnetwork + Dserver

Rr 0.005 + 0.0097 + 0.143 = 0.158 sec.

Page 17: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

17

A Web Server and its Queues

Disk 2

Disk 1

CPU

requests/sec

Xo

Scpu

Vcpu

Sdisk2

Vdisk2

Sdisk1

Vdisk1

WebServer

Page 18: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

18

A Web Server and its Queues: parameters and notation (1)

• Vi: average number of visits to queue i by a request;

• Si: average service time of a request at queue i per

visit to the resource;

i average arrival rate of requests to queue i

• Di service demand of a request at queue i,

• Di = Vi x Si

Page 19: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

19

A Web Server and its Queues: parameters

and notation (2)

• Ni: average number of requests at queue i, waiting

or receiving service from the resource

• Xi: average throughput of queue i, i.e. average

number of requests that complete from queue i per unit of time

• Xo: average system throughput, defined as the

number of requests that complete per unit of time.

Page 20: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

20

Basic Performance Results

Utilization Law

• The utilization (Ui ) of resource i is the fraction of time that the resource is busy.

Ui = Xi * Si = i * Si

Page 21: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

21

Utilization Law: example

• A network segment transmits 1,000 packets/sec. Each packet has an average transmission time equal to 0.15 msec.

• What is the utilization of the LAN segment?

Page 22: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

22

Utilization Law: example

• A network segment transmits 1,000 packets/sec. Each packet has an average transmission time equal to 0.15 msec.

• What is the utilization of the LAN segment?

ULAN = XLAN * SLAN = 1,000 * 0.00015 = 0.15 = 15%

Page 23: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

23

Basic Performance Results

Forced Flow Law

• By definition of the average number of visits Vi, each completing request has to pass Vi times, on the average, by queue i. So, if Xo requests complete per unit of time, Vi*Xo requests will visit queue i.

Xi = Vi * Xo

Page 24: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

24

Forced Flow Law: example• Database transactions perform an average of 4.5 I/O

operations on the database server. During a one-hour monitoring period, 7,200 transactions were executed.

• What is the average throughput of the disk?

• If each I/O takes 20 msec on the average, what is the disk utilization?

Page 25: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

25

Forced Flow Law: example• Database transactions perform an average of 4.5 I/O

operations on the database server. During a one-hour monitoring period, 7,200 transactions were executed.

• What is the average throughput of the disk?

• If each I/O takes 20 msec on the average, what is the disk utilization?

Xserver = 7,200 / 3,600 = 2 tps

Xdisk = Vdisk * Xserver = 4.5 * 2 = 9 tps

Udisk = Xdisk * Sdisk = 9 * 0.02 = 0.18 = 18%

Page 26: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

26

Basic Performance Results

Service Demand Law

• The service demand Di is related to the system throughput and utilization by the following:

Di = Vi * Si = (Xi/Xo)(Ui/Xi) = Ui / Xo

Page 27: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

27

Service Demand Law: example

• A Web server running on top of a Unix system was monitored for 10 minutes. It was observed that the CPU was 90% busy during the monitoring period. The number of HTTP requests counted in the log was 30,000.

• What is the CPU service demand of an HTTP request?

Page 28: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

28

Service Demand Law: example

• A Web server running on top of a Unix system was monitored for 10 minutes. It was observed that the CPU was 90% busy during the monitoring period. The number of HTTP requests counted in the log was 30,000.

• What is the CPU service demand of an HTTP request?

Ucpu = 90%

Xserver = 30,000 / (10*60) = 50 requests/sec

Dcpu = Vcpu * Scpu = Ucpu / Xserver = 0.90 / 50 = 0.018 sec

Page 29: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

29

Basic Performance ResultsLittle’s Law

• The average number of customers in a “black box” is equal to average time each customer spends in the “box” times the throughput of the “box”.

N = R * X

X

R

N

Page 30: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

30

Little’s Law: example (1)• An NFS server was monitored during 30 min and the

number of I/O operations performed during this period was found to be 10,800. The average number of active requests (Nreq) was 3.

• What was the average response time per NFS request at the server?

Page 31: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

31

Little’s Law: example (1)• An NFS server was monitored during 30 min and the

number of I/O operations performed during this period was found to be 10,800. The average number of active requests (Nreq) was 3.

• What was the average response time per NFS request at the server?

“black box” = NFS server

Xserver = 10,800 / 1,800 = 6 requests/sec

Rreq = Nreq / Xserver = 3 / 6 = 0.5 sec

Page 32: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

32

Little’s Law: example (2)

• The average delay experienced by a packet when traversing a network segment is 50 msec. The average number of packets that cross the network per second is 512 packets/sec (network throughput).

• What is the average number of packets in transit in the network?

Page 33: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

33

Little’s Law: example (2)

• The average delay experienced by a packet when traversing a network segment is 50 msec. The average number of packets that cross the network per second is 512 packets/sec (network throughput).

• What is the average number of packets in transit in the network?

“black box” = network segment

Npackets = Rpacket * Xnetwork

Npackets = 0.05 * 512 = 25.6 packets

Page 34: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

34

Little’s Law: example (3)

• The disk of a Web server receives requests at a rate of 20 requests/sec. The average disk service time, considering both random and sequential requests, is 8.02 msec.

• What is the average disk utilization?

Page 35: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

35

Little’s Law: example (3)

• The disk of a Web server receives requests at a rate of 20 requests/sec. The average disk service time, considering both random and sequential requests, is 8.02 msec.

• What is the average disk utilization?

“black box” = disk

disk = Xdisk = 20 requests/sec

Srequest = 0.00802 sec

Udisk = Srequest * Xdisk = 0.00802 * 20 = 16.04%

Page 36: 1 Part II Web Performance Modeling: basic concepts © 1998 Menascé & Almeida. All Rights Reserved.

36

Part II: Summary

• Basic Concept of Queuing Theory and Operational Analysis• terminology and notation

• service time and service demand

• waiting time and queuing time

• Basic Performance Results and Examples• utilization law

• forced flow law

• service demand law

• Little’s Law


Recommended