![Page 1: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/1.jpg)
Estimating TCP Latency
Approximately with Passive
Measurements
Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose
![Page 2: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/2.jpg)
2
Motivation: Network Troubleshooting
• Home network or access link?o WiFi signal or access link?
• ISP, enterprise and content provider networkso Within the network or outside?
??
? Latency and network performance
problems? Where? Why?
![Page 3: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/3.jpg)
3
Passive Measurement in the Middle
• Decompose path latency of TCP flowso Latency: Important interactive web-applicationso Other approaches: active probing, NetFlow
• Challengeso Constrained devices and high data rates
Challenge: Constrained Resources
Passive measurement device (gateway,
router)A B
![Page 4: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/4.jpg)
4
TCP Latency
• Existing methods: Emulate TCP state for each flow
• Accurate estimates but expensive
Source Destination
Tim
e
TS1
TM1
TM2
TS2
TD1
TD2
RTT = TM2 – TM1
S 0, 99
A100
![Page 5: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/5.jpg)
5
TCP Latency• Scaling challenges
o Large packet and flow arrivals
o Constrained devices (limited memory/CPU)
• ALE – Approximate Latency Estimator
Source Destination
Tim
e
Large TCP state
Expensive lookup
![Page 6: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/6.jpg)
6
Design Space
Accuracy
Overhead
Ideal solution
ALE Goals: Configurable
tradeoff
Existing solutions e.g.,
tcptrace
Expensive for constrained devices
![Page 7: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/7.jpg)
7
ALE Overview• Eliminate packet
timestampso Group into time intervals
with granularity (w)
• Store expected ACKo SEG: 0-99, ACK: 100
• Use probabilistic set membership data structureo Counting Bloom Filters
Source Destination
Tim
e
ΔT = w
ΔT = w
S 0, 99
A100
![Page 8: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/8.jpg)
8
• Sliding window of buckets (time intervals)o Buckets contain a counting bloom filter (CBF)
ALE Overview
CBF CBF CBF
TALE
Ww w w
CBF
S 0, 99 A
100
S0, 99
hash(FlowId, 99+1)
i
CBFCBF
A 100
i
RTT = Δ + w + w/2 hash(inv(FlowId), 100)
Current Bucket
Lookup
i i i
Matchw w/2Δ
Missed Latencies
Max Error: w/2
![Page 9: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/9.jpg)
9
Controlling Error with ALE Parameters
Decrease w: Higher Accuracy
Increase W: Higher
Coverage
ALE-U (uniform)
W
w
Number of buckets = W/w
![Page 10: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/10.jpg)
10
ALE-Exponential (ALE-E)
• Process large and small latency flows simultaneously
• Absolute error is proportional to the latency
• Larger buckets shift slowly
A
w 2w 4w
BCDE BADCF DCBAG
Counting Bloom Filter (CBF) Merge
![Page 11: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/11.jpg)
11
Error Sources• Bloom filters are probabilistic structures
o False positives and negatives
Artifacts from TCP
• Retransmitted packets and Reordered packetso Excess (to tcptrace) erroneous RTT samples
• ACK numbers not on SEQ boundaries, Cumulative ACKs
![Page 12: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/12.jpg)
12
Evaluation Methodology
• 2 x Tier 1 backbone link traces (60s each) from CAIDAo Flows: 2,423,461, Packets: 54,089,453o Bi-directional Flows: 93,791, Packets: 5,060,357
• Ground truth/baseline comparison: tcptraceo Emulates TCP state machine
• Latencies ALE and tcptraceo Packet and flow level
• Overhead of ALE and tcptraceo Memory and compute
![Page 13: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/13.jpg)
13
Latency Distribution60 ms 120 ms 300 ms 500 ms
Majority of thelatencies
![Page 14: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/14.jpg)
14
Accuracy: RTT Samples
• Range 0-60 ms
• Box plot of RTT differences
• More memory => Closer to tcptrace
Exact match with tcptraceIncreasing overhead
(smaller ‘w’)
![Page 15: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/15.jpg)
15
Accuracy: RTT Samples
Exact match with tcptraceIncreasing overhead
ALE-E(12) outperforms ALE-U(24) for small latencies
![Page 16: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/16.jpg)
16
Accuracy: Flow Statistics
• Many applications use aggregated flow statics
• Small w (more buckets)o Median flow latencies
approach tcptrace
Exact match with tcptrace
CD
F
![Page 17: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/17.jpg)
17
Accuracy: Flow Statistics
Small w: Standard
deviation of flow latencies approach tcptrace
Exact match with tcptrace
![Page 18: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/18.jpg)
18
Compute and Memory Overhead
• Sample flows uniformly at random at rates 0.1, 0.2, . . . 0.7o 5 pcap sub-traces per rateo Higher sampling rate (data rate) ⇒ More state for
tcptrace
• GNU Linux taskstats API o Compute time and memory usage
![Page 19: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/19.jpg)
19
Compute Time
ALE scales with increasing data rates
![Page 20: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/20.jpg)
20
Memory OverheadTCPTRACE ALE-U(96)
• RSS memory: ≈64 MB (0.1) to ≈460 MB (0.7)
• VSS memory: ≈74 MB (0.1) to ≈468 MB (0.7)
• RSS memory: 2.0 MB for all Sampling rates
• VSS memory: 9.8 MB for all sampling rates
ALE uses a fixed size data structure
![Page 21: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/21.jpg)
21
Conclusions• Current TCP measurements emulate state
o Expensive: high data rates, constrained devices
• ALE provides low overhead data structure o Sliding window of CBF buckets
• Improvements over compute and memory with tcptrace sacrificing small accuracyo Tunable parameters
• Simple hash functions and counterso Hardware Implementation
![Page 22: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/22.jpg)
22
Thank You
![Page 23: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/23.jpg)
23
ALE Compute and Memory Bounds
• Insertion: O(h) time o CBF with h hash functions
• Matching ACK number: O(hn) timeo ‘n’ buckets
• Shifting buckets: O(1) timeo Linked list of buckets
• ALE-E: O(C) time to merge CBFso ‘C’ counters in the CBF
• Memory usage: n × C × d bitso ‘d‘ bit CBF counters
![Page 24: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/24.jpg)
24
ALE Error Bounds
• ALE-U: Average case error w/4• ALE-U: Worst case error w/2
• ALE-E: Average case error (3w/16)2i
• ALE-E: Worst case error (2i−1w)o ACK has a match in bucket i
![Page 25: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/25.jpg)
25
ALE Parameters• ‘w’ on accuracy requirements• ‘W’ estimate of the maximum latencies expected• CBFs with h = 4 hash functions• C on traffic rate, w, false positive rate and h
• E.g., For w = 20 ms, h = 4, and m = R × w, the constraint for optimal h (h = (C/m) ln 2) yields C = 40396 counters
![Page 26: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/26.jpg)
26
Compute Time
ALE scales with increasing data rates
10 min trace
![Page 27: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/27.jpg)
27
Accuracy: RTT Samples
![Page 28: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/28.jpg)
28
Memory Overhead
![Page 29: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/29.jpg)
29
• Eliminate packet timestampso Time quantization: Use fixed number of intervals
• Store expected acknowledgement number
ALE Overview
S 0, 99
S100, 199
S200, 299
S300, 399
S400, 499
S500, 599
S600, 699
S700, 799
S800, 899
T1 T2 T3
S 100
S 200
S 300
S 400
S 500
S 600
S 700
S 800
S 900
T1 T2 = T1 + w T3 = T1 + 2w
![Page 30: Estimating TCP Latency Approximately with Passive Measurements Sriharsha Gangam, Jaideep Chandrashekar, Ítalo Cunha, Jim Kurose](https://reader036.vdocument.in/reader036/viewer/2022062322/56649ca75503460f949699d5/html5/thumbnails/30.jpg)
30
Motivation: Network Troubleshooting
Latency Sensitive
Applications
Latency and network performance
problems? Where? Why?