EECS 122: Introduction to Computer Networks Performance Modeling
description
Transcript of EECS 122: Introduction to Computer Networks Performance Modeling
![Page 1: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/1.jpg)
Katz, Stoica F04
EECS 122: Introduction to Computer Networks
Performance Modeling
Computer Science Division
Department of Electrical Engineering and Computer Sciences
University of California, Berkeley
Berkeley, CA 94720-1776
![Page 2: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/2.jpg)
2Katz, Stoica F04
Outline
Motivations Timing diagrams Metrics Evaluation techniques
![Page 3: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/3.jpg)
3Katz, Stoica F04
Motivations
Understanding network behavior Improving protocols Verifying correctness of implementation Detecting faults Monitor service level agreements Choosing provides Billing
![Page 4: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/4.jpg)
4Katz, Stoica F04
Outline
Motivations Timing diagrams Metrics Evaluation techniques
![Page 5: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/5.jpg)
5Katz, Stoica F04
Timing Diagrams
Sending one packet Queueing Switching
- Store and forward
- Cut-through
Fluid view
![Page 6: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/6.jpg)
6Katz, Stoica F04
Definitions
Link bandwidth (capacity): maximum rate (in bps) at which the sender can send data along the link
Propagation delay: time it takes the signal to travel from source to destination
Packet transmission time: time it takes the sender to transmit all bits of the packet
Queuing delay: time the packet need to wait before being transmitted because the queue was not empty when it arrived
Processing Time: time it takes a router/switch to process the packet header, manage memory, etc
![Page 7: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/7.jpg)
7Katz, Stoica F04
Sending One Packet
R bits per second (bps)
T seconds
P bits
Bandwidth: R bpsPropagation delay: T sec
time
Transmission time = P/RT
Propagation delay =T = Length/speed
1/speed = 3.3 usec in free space 4 usec in copper 5 usec in fiber
![Page 8: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/8.jpg)
8Katz, Stoica F04
Sending one Packet: Examples
P = 1 KbyteR = 1 Gbps100 Km, fiber => T = 500 usec P/R = 8 usec
T
P/Rtime
time
T
P/R
P = 1 KbyteR = 100 Mbps1 Km, fiber => T = 5 usec P/R = 80 usec
T >> P/R
T << P/R
![Page 9: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/9.jpg)
9Katz, Stoica F04
Queueing
The queue has Q bits when packet arrives packet has to wait for the queue to drain before being transmitted
P bits
time
P/RT
Q bits
Queueing delay = Q/R
Capacity = R bpsPropagation delay = T sec
![Page 10: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/10.jpg)
10Katz, Stoica F04
Queueing Example
P = 1 Kbit; R = 1 Mbps P/R = 1 ms
Packet arrivalTime (ms)
Time
Delay for packet that arrives at time t, d(t) = Q(t)/R + P/RDelay for packet that arrives at time t, d(t) = Q(t)/R + P/RQ(t)
1 Kb
P bits Q bits
0 0.5 1 7 7.5
0.5 Kb
1.5 Kb
2 Kb
packet 1, d(0) = 1ms
packet 2, d(0.5) = 1.5ms
packet 3, d(1) = 2ms
![Page 11: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/11.jpg)
11Katz, Stoica F04
Switching: Store and Forward
A packet is stored (enqueued) before being forwarded (sent)
Sender Receiver
10 Mbps 5 Mbps 100 Mbps 10 Mbps
time
![Page 12: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/12.jpg)
12Katz, Stoica F04
Store and Forward: Multiple Packet Example
Sender Receiver
10 Mbps 5 Mbps 100 Mbps 10 Mbps
time
![Page 13: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/13.jpg)
13Katz, Stoica F04
Switching: Cut-Through
A packet starts being forwarded (sent) as soon as its header is received
Sender Receiver
R1 = 10 Mbps R2 = 10 Mbps
time
Header
What happens if R2 > R1 ?
![Page 14: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/14.jpg)
14Katz, Stoica F04
Fluid Flow System
Packets are serviced bit-by-bit as they arrive
a(t)
e(t)
Q(t)
t
Rate or Queue size
Q(t)a(t) – arrival rate e(t) – departure rate
Q(t) = queueing size at time t
![Page 15: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/15.jpg)
15Katz, Stoica F04
Outline
Motivations Timing diagrams Metrics
• Throughput
• Delay
Evaluation techniques
![Page 16: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/16.jpg)
16Katz, Stoica F04
Throughput
Throughput of a connection or link = total number of bits successfully transmitted during some period [t, t + T) divided by T
Link utilization = throughput of the link / link rate Bit rate units: 1Kbps = 103bps, 1Mbps = 106bps, 1 Gbps
= 109bps [For memory: 1 Kbyte = 210 bytes = 1024 bytes]
- Some rates are expressed in packets per second (pps) relevant for routers/switches where the bottleneck is the header processing
![Page 17: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/17.jpg)
17Katz, Stoica F04
Example: Windows Based Flow Control
Connection: - Send W bits (window size)
- Wait for ACKs
- Repeat
Assume the round-trip-time is RTT seconds
Throughput = W/RTT bps
Numerical example:- W = 64 Kbytes
- RTT = 200 ms
- Throughput = W/T = 2.6 Mbps
time
Source Destination
RTT
RTT
RTT
![Page 18: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/18.jpg)
18Katz, Stoica F04
Throughput: Fluctuations
Throughput may vary over time
max
min
mean
Throughput
Time
![Page 19: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/19.jpg)
19Katz, Stoica F04
Delay
Delay (Latency) of bit (packet, file) from A to B- The time required for bit (packet, file) to go from A to B
Jitter- Variability in delay
Round-Trip Time (RTT)- Two-way delay from sender to receiver and back
Bandwidth-Delay product- Product of bandwidth and delay “storage” capacity of
network
![Page 20: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/20.jpg)
20Katz, Stoica F04
Delay: Illustration 1
at point 2at point 1
Latest bit seenby time t
Delay
Sender Receiver
1 2
time
![Page 21: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/21.jpg)
21Katz, Stoica F04
Delay: Illustration 2
Sender Receiver
1 2
2
1Packet arrival times at 1
Packet arrival times at 2Delay
![Page 22: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/22.jpg)
22Katz, Stoica F04
Little’s Theorem
Assume a system (e.g., a queue) at which packets arrive at rate a(t)
Let d(i) be the delay of packet i , i.e., time packet i spends in the system
What is the average number of packets in the system?
systema(t) – arrival rate
d(i) = delay of packet i
Intuition:- Assume arrival rate is a = 1 packet per second and the delay
of each packet is s = 5 seconds
- What is the average number of packets in the system?
![Page 23: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/23.jpg)
23Katz, Stoica F04
Little’s Theorem
Latest bit seenby time t
Sender Receiver
1 2
time
x(t)
d(i) = delay of packet ix(t) = number of packets in transit (in the system) at time t
T
What is the system occupancy, i.e., average number of packets in transit between 1 and 2 ?
![Page 24: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/24.jpg)
24Katz, Stoica F04
Little’s Theorem
Latest bit seenby time t
Sender Receiver
1 2
time
x(t)
T
Average occupancy = S/T
d(i) = delay of packet ix(t) = number of packets in transit (in the system) at time t
S= area
![Page 25: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/25.jpg)
25Katz, Stoica F04
Little’s Theorem
Latest bit seenby time t
Sender Receiver
1 2
time
x(t)
S(N)
Pd(N-1)
S(N-1)
T
S = S(1) + S(2) + … + S(N) = P*(d(1) + d(2) + … + d(N))
d(i) = delay of packet ix(t) = number of packets in transit (in the system) at time t
S= area
![Page 26: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/26.jpg)
26Katz, Stoica F04
Average occupancy
Average arrival time Average delay
Little’s Theorem
Latest bit seenby time t
Sender Receiver
1 2
time
x(t)
S(N)
Pd(N-1)
S(N-1)
TS/T = (P*(d(1) + d(2) + … + d(N)))/T = ((P*N)/T) * ((d(1) + d(2) + … + d(N))/N)
d(i) = delay of packet ix(t) = number of packets in transit (in the system) at time t
S= area
![Page 27: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/27.jpg)
27Katz, Stoica F04
Little’s Theorem
Latest bit seenby time t
Sender Receiver
1 2
time
x(t)
S(N)
Average occupancy = (average arrival rate) x (average delay)
S= area
a(i)d(N-1)
S(N-1)
T
d(i) = delay of packet ix(t) = number of packets in transit (in the system) at time t
![Page 28: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/28.jpg)
28Katz, Stoica F04
Outline
Motivations Timing diagrams Metrics Evaluation techniques
![Page 29: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/29.jpg)
29Katz, Stoica F04
Evaluation Techniques
Measurements- gather data from a real network
- e.g., ping www.berkeley.edu
- realistic, specific Simulations: run a program that pretends to be a real
network- e.g., NS network simulator, Nachos OS simulator
Models, analysis- write some equations from which we can derive conclusions
- general, may not be realistic Usually use combination of methods
![Page 30: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/30.jpg)
30Katz, Stoica F04
Analysis
Example: M/M/1 Queue
Arrivals are Poisson with rate a Service times are exponentially distributed with
mean 1/s- s - rate at which packets depart from a full queue
Average delay per packet:T = 1/(s – a) = (1/a)/(1 – u), where u = a/s = utilization
Numerical example, 1/a = 1ms; u = 80% Q = 5ms
a s
![Page 31: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/31.jpg)
31Katz, Stoica F04
Simulation
Model of traffic Model of routers, links Simulation:
- Time driven: X(t) = state at time t X(t+1) = f(X(t), event at time t)
- Event driven:E(n) = n-th eventY(n) = state after event nT(n) = time when even n occurs[Y(n+1), T(n+1)] = g(Y(n), T(n), E(n))
Output analysis: estimates, confidence intervals
![Page 32: EECS 122: Introduction to Computer Networks Performance Modeling](https://reader035.fdocuments.in/reader035/viewer/2022070404/56813b13550346895da3bef4/html5/thumbnails/32.jpg)
32Katz, Stoica F04
Evaluation: Putting Everything Together
Usually favor plausibility, tractability over realism- Better to have a few realistic conclusions than none (could not
derive) or many conclusions that no one believes (not plausible)
Reality Model
HypothesisConclusion
Abstraction
Plausibility
Derivation Tractability
Realism
Prediction