ee 122 : networks performance & modeling
DESCRIPTION
EE 122 : Networks Performance & Modeling. Ion Stoica TAs: Junda Liu, DK Moon, David Zats http://inst.eecs.berkeley.edu/~ee122/fa09 (Materials with thanks to Vern Paxson , Jennifer Rexford, and colleagues at UC Berkeley). Outline. Motivations Timing diagrams Metrics Little’s Theorem - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/1.jpg)
1
EE 122: Networks Performance & Modeling
Ion StoicaTAs: Junda Liu, DK Moon, David Zatshttp://inst.eecs.berkeley.edu/~ee122/fa09
(Materials with thanks to Vern Paxson, Jennifer Rexford,and colleagues at UC Berkeley)
![Page 2: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/2.jpg)
2
Outline
Motivations Timing diagrams Metrics Little’s Theorem Evaluation techniques
![Page 3: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/3.jpg)
3
Motivations
Understanding network behavior Improving protocols Verifying correctness of implementation Detecting faults Monitor service level agreements Choosing providers Billing
![Page 4: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/4.jpg)
4
Outline
Motivations Timing diagrams Metrics Little’s theorem Evaluation techniques
![Page 5: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/5.jpg)
5
Timing Diagrams
Sending one packet Queueing Switching
Store and forward Cut-through
![Page 6: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/6.jpg)
6
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: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/7.jpg)
7
Sending One PacketR bits per second (bps)
T seconds
P bits
Bandwidth: R bpsPropagation delay: T sec
time
Transmission time = P/RT
Propagation delay =T = Length/speed
1m/speed = 3.3 usec in free space 4 usec in copper 5 usec in fiber
![Page 8: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/8.jpg)
8
Sending one Packet: ExamplesP = 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: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/9.jpg)
9
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: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/10.jpg)
10
Queueing ExampleP = 1 Kbit; R = 1 Mbps P/R = 1 ms
Packet arrivalTime (ms)
Delay for packet that arrives at time t, d(t) = Q(t)/R + P/R
0
packet 1, d(0) = 1ms
Time
Q(t)
1 Kb0.5 Kb
1.5 Kb
2 Kb
0.5
packet 2, d(0.5) = 1.5ms
1
packet 3, d(1) = 2ms
7 7.5
![Page 11: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/11.jpg)
11
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: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/12.jpg)
12
Store and Forward: Multiple Packet Example
Sender Receiver
10 Mbps 5 Mbps 100 Mbps 10 Mbps
time
![Page 13: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/13.jpg)
13
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: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/14.jpg)
14
Outline
Motivations Timing diagrams Metrics
• Throughput• Delay
Little’s Theorem Evaluation techniques
![Page 15: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/15.jpg)
15
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 16: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/16.jpg)
16
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/RTT =
64,000*8/0.2s = 2.6 Mbps time
Source Destination
RTT
RTT
RTT
![Page 17: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/17.jpg)
17
Throughput: Fluctuations Throughput may vary over time
max
min
mean
Throughput
Time
![Page 18: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/18.jpg)
18
Delay Related Metrics
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 19: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/19.jpg)
19
Delay Illustration
Sender Receiver
1 2
Delay
at point 2at point 1
Latest bit seenby time t
time
![Page 20: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/20.jpg)
20
Outline
Motivations Timing diagrams Metrics Little’s Theorem Evaluation techniques
![Page 21: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/21.jpg)
21
Little’s Theorem Assume a system at which packets arrive at
rate λ Let d be mean delay of packet, i.e., mean
time a packet spends in the system Q: What is the mean (average) number of
packets in the system (N) ?
systemλ – mean arrival rate
d = mean delay
![Page 22: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/22.jpg)
22
Example λ = 1 d = 5
0 1 2 3 4 5 6 7 8 169 10 11 12 13 14 15 time
packets
d = 5
N = 5 packets
A: N = λ x d E.g., N = λ x d = 5
![Page 23: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/23.jpg)
23
Little’s Theorem: Proof SketchLatest 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: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/24.jpg)
24
Little’s Theorem: Proof SketchLatest 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 P = packet size
S= area
![Page 25: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/25.jpg)
25
Little’s Theorem: Proof SketchLatest 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 P = packet size
S= area
![Page 26: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/26.jpg)
26
Average occupancy
Average arrival rate Average delay
Little’s Theorem: Proof SketchLatest 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)
S= area
d(i) = delay of packet ix(t) = number of packets in transit (in the system) at time t P = packet size
![Page 27: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/27.jpg)
27
Little’s Theorem: Proof SketchLatest bit seenby time t
Sender Receiver
1 2
time
x(t)
S(N)
Average occupancy = (average arrival rate) x (average delay)
S= area
Pd(N-1)
S(N-1)
T
d(i) = delay of packet ix(t) = number of packets in transit (in the system) at time t P = packet size
![Page 28: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/28.jpg)
28
Outline
Motivations Timing diagrams Metrics Little’s Theorem Evaluation techniques
![Page 29: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/29.jpg)
29
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: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/30.jpg)
30
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 31: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/31.jpg)
31
Simulation Example
Use trivial time-driven simulation to illustrate statistical multiplexing
Probabilistically generate the bandwidth of a flow, e.g., With probability 0.2, bandwidth is 6 With probability 0.8, bandwidth is 1
Average bandwidth, avg=0.2*6 + 0.8*1 = 2 peak/avg = 6/2 = 3
![Page 32: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/32.jpg)
32
One Flow
01234567
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Time
Ban
dwid
th
peak=6
avg=2
peak / avg = 3
![Page 33: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/33.jpg)
33
Two Flows
0
2
4
6
8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Time
Ban
dwid
th
agg_peak=7
agg_avg=3.75
agg_peak / agg_avg = 7/3.75 = 1.86(agg_avg = average of aggregate bandwidth)(agg_peak=maximum value of aggregate bandwidth)
![Page 34: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/34.jpg)
34
50 Flows
0
50
100
150
1 3 5 7 9 11 13 15 17 19
Time
Ban
dwid
th
agg_peak=135agg_avg=105.25
agg_peak / agg_avg = 7/3.75 = 135/105.25 = 1.28
![Page 35: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/35.jpg)
35
Statistical Multiplexing
As number of flows increases, agg_peak/agg_avg decreases For 1000 flows, peak/avg = 2125/2009=1.057
Q: What does this mean? A: Multiplexing a large enough number of flows
“eliminates” burstiness Use average bandwidth to provision capacity, instead
of peak bandwidth E.g., For 1000 flows
Average of aggregate bandwidth = 2,000 Sum of bandwidth peaks = 6,000
![Page 36: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/36.jpg)
36
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
![Page 37: EE 122 : Networks Performance & Modeling](https://reader035.vdocuments.us/reader035/viewer/2022062520/568163fb550346895dd59327/html5/thumbnails/37.jpg)
37
Next Lecture
Architecture, Layering, and the “End-to-End Principle”
Read 1.4 & 1.5 of Kurose/Ross Pick up class computer account forms, if you
haven’t done it already
Project 1 (tiny world or warcrafts)out today First part (client) due Oct 7 @ 11:59:59pm Second part (server) due Oct 26 @ 11:59:59pm