Fast PatternBased Throughput Prediction for TCP Bulk Transfers
Fast Pattern-Based Throughput Prediction for TCP Bulk Transfers Tsung-i (Mark) Huang Jaspal Subhlok University of Houston GAN’ 05 / May 10, 2005 TMH - GAN'05, 05/10/2005
Outline Background n Problem Description n Methodology n Experiments and Results n Conclusion and Future Works n TMH - GAN'05, 05/10/2005 2
“Are we there yet? ” n When you need Throughput Prediction? ¨ File download: xx minutes left: MS IE vs. Mozilla ¨ Mirror site selection: Knoppix: Florida State Univ. (fsu. edu) or TU Ilmenau, Germany (tu-ilmenau. de) ¨ Resource selection in a grid environment ¨ Cache selection for web content delivery services TMH - GAN'05, 05/10/2005 3
Which site will give the best throughput? n Current approaches and tools: ¨ Geographical distance ¨ Ping (ICMP) ¨ Download 512 KBytes (fixed size) – NWS / iperf ¨ Download 10 seconds (fixed duration) - iperf n Last two approaches are most accurate: ¨ How n much data to download / How long? Is “Bandwidth * Delay” the answer? One size fits all? ¨ “All or nothing” – no result is available until the end of transmission TMH - GAN'05, 05/10/2005 4
Problem Description Predicted future throughput can be used in mirror/replica site selection n Predict throughput of a TCP bulk transfer n ¨ Single TCP stream ¨ Input: Time Series of (Arrival time, Bytes received) ¨ Output: Predicted future throughput ¨ Make a prediction of future throughput after 10 ~ 100 RTTs ¨ Utilize knowledge of TCP flow patterns ¨ Assume TCP flow patterns will repeat later in the same TCP stream TMH - GAN'05, 05/10/2005 5
TCP Flow Patterns • Textbook Examples: (a) Rate Control (b) Congestion Control • In Reality: (c) Rate Control with delay TMH - GAN'05, 05/10/2005 (d) Mixed Congestion Control 6
Approach to Throughput Prediction n Analyze Time-Series (TS 1) of (Arrival Time, Bytes received) to get a meaningful throughput Time-Series ¨ Possible solutions: n Instant throughput: throughput since previous TCP segment n Fixed Interval throughput: avg throughput over a fixed time period n Per RTT throughput: partition using fixed SYN-ACK RTT ¨ n n n Idea: TCP sends a window full of data segments every RTT Partition Time-Series (TS 1 ) with fixed SYN-ACK RTT, and get per RTT Throughput (TS 2 ) Analyze per RTT Throughput Time-Series (TS 2 ) to predict future throughput Compare different prediction methods across all traces TMH - GAN'05, 05/10/2005 7
TCP Segment Partitioning (1) SYN-ACK RTT = 176 ms per RTT Throughput Log Scaled Over 1 GBytes/sec Fixed Interval of 100 ms 121 KB/sec About 22040 Bytes/sec KB/sec Instant throughput shows wide-range of fluctuation. Fixed Interval throughput shows less fluctuation. TMH - GAN'05, 05/10/2005 8
TCP Segment Partitioning (2) n RTT estimation ¨ Use fixed SYN-ACK RTT ¨ Simple and effective n SYN RTT ACK Partition TCP segments into per RTT throughput time series TMH - GAN'05, 05/10/2005 9
Throughput Prediction (1) Flat n TCP Patterns ¨ Rate Control limited (RC) ¨ Congestion Control limited (CC) n Identify basic elements Exponential Climb Linear Climb ¨ Flat regions ¨ Exponential Climb regions ¨ Linear Climb regions ¨ Drop points TMH - GAN'05, 05/10/2005 10
Throughput Prediction (2) n Peak of slow start ¨ Data points up to end of slow start are ignored for prediction n n RC-based prediction flat regions CC-based prediction ¨ Use n Peak of slow start initial slow start does not repeat ¨ Use n 1 st complete CC cycles Window-based prediction ¨ If no clear pattern observed TMH - GAN'05, 05/10/2005 11
Experiments (1) - Setup n Download data files from 290 web sites (Debian/Gentoo mirrors) ¨ Use TCPDUMP to capture receiver’s traffic ¨ Record SYN-ACK RTTs ¨ Include Retransmitted packets (0. 09%) ¨ Average file size is 30 MBytes n n 461 traces collected at Univ. of Houston Traces are analyzed using perl scripts TMH - GAN'05, 05/10/2005 12
Experiments (2) – Prediction Methods n Prediction methods compared ¨ Moving Average (MA) – avg throughput of previous 10 RTTs ¨ Exponential Weighted Moving Average (EWMA) ¨ Aggregate throughput – average past throughput (same as cumulative average); use this as predicted throughput ¨ TCP n Pattern prediction Average error in predicted future throughput predicted throughput – measured throughput ¨ Cut off at very small TMH - GAN'05, 05/10/2005 x 100% if over, in case measured future throughput is 13
Illustration of Prediction (1) Make a prediction for next 200 RTTs: Peak of slow start Drop at 27 th RTT per RTT throughput Aggregate TCP Pattern 25 th RTT 40 th. Window RTT size (in RTTs) Prediction at 25 th RTT • Aggregate Throughput Prediction: average throughput of 0~25 RTTs • TCP Throughput Prediction: average throughput of 9~25 RTTs (RC-based prediction) Prediction at 40 th RTT • TCP Throughput Prediction: using Window-based prediction after 27 th RTTs (a significant drop) TMH - GAN'05, 05/10/2005 14
Illustration of Prediction (2) Make a prediction for next 200 RTTs: per RTT throughput Aggregate per RTT throughput Moving Average Aggregate EWMA TCP Pattern Window size (in RTTs) Closer to 0, better the prediction. • Avg error against measured future throughput of next 200 RTTs (for example, at 20 th RTT, avg throughput of 21~220 RTTs is used) TMH - GAN'05, 05/10/2005 15
Illustration of Prediction (3) Make a prediction for next 200 RTTs: One complete CC cycle per RTT throughput Aggregate Moving Average TCP Pattern EWMA TCP Pattern Prediction made at 65 th RTT using 3 CC complete cycles Closer to 0, better the prediction. Throughput prediction using Congestion-Control based patterns. TMH - GAN'05, 05/10/2005 16
Results (1) – predict next 200 RTTs at different time 30 th RTT per. RTTthroughput Moving Average Aggregate EWMA Moving Average TCP Pattern EWMA TCP Pattern • Aggregate is not accurate for small window size (< 30 RTTs) • MA / EWMA generally not as accurate TMH - GAN'05, 05/10/2005 17
Results (2) – predict at 15 th RTT for different time in the future per. RTTthroughput Moving Average Aggregate EWMA Moving Average TCP Pattern EWMA TCP Pattern • When only limited data is available, TMH - GAN'05, 05/10/2005 • Aggregate is not accurate • MA performs best; TCP Pattern is close 18
Results (3) – predict at 25 th RTT for different time in the future per. RTTthroughput Moving Average Aggregate EWMA Moving Average TCP Pattern EWMA TCP Pattern • More data is available, • Aggregate performs better • TCP Pattern performs best; MA is close TMH - GAN'05, 05/10/2005 19
Results (4) – predict at 50 th RTT for different time in the future per. RTTthroughput Moving Average Aggregate EWMA Moving Average TCP Pattern EWMA TCP Pattern • Even more data is available, TMH - GAN'05, 05/10/2005 • TCP Pattern best and Aggregate is close • MA now performs worse, due to dynamic of TCP flows 20
Summary of Results Aggregate is accurate with sufficient data, not with a few RTTs of data n MA performs very well for a few RTTs of data n EWMA is not a good predictor n TCP Pattern generally performs better or as well as other methods n TMH - GAN'05, 05/10/2005 21
Summary of Results (table view) Methods Aggregate Moving Average EWMA TCP Pattern TMH - GAN'05, 05/10/2005 Small # of RTTs of data Worse (3) Large # of RTTs of data Better (2) Best (1) Worse (3) Worst (4) Better (2) Worst (4) Best (1) 22
Conclusion and Future Works n n n TCP-pattern based throughput prediction is as good or better than other methods. Good predictions within 25 RTTs (or ~ 5 sec). Patterns observed: 65% Rate Control, few Congestion Control Methods using Aggregate (e. g. NWS) can not be expected to work well for small test files What’s next? ¨ Identify more patterns ¨ Add a degree of confidence for each prediction ¨ Multiple TCP streams TMH - GAN'05, 05/10/2005 23
That’s all, folks! Thank You! TMH - GAN'05, 05/10/2005 24
Supplement Slides TMH - GAN'05, 05/10/2005 25
Characteristics of collected traces (1) Terms Number of traces Downloaded file size Unique web sites Values Comments 461 26 -34 MB 290 Avg: 30 MB Debian/Gentoo Avg # segment per trace 24, 062 (min/max/median) = (17, 025/69, 866/24, 412) Retransmitted segments 0. 09% 97 out of 461 traces Avg # retransmitted segments per trace 103. 6 (min/max/median) = (0/2, 672/4) 0. 1696 sec (min/max/median) = (0. 02/2. 91/0. 155) 2, 589 (min/max/median) = (143/110, 673/662) Avg SYN-ACT RTT Avg # RTTs per trace TMH - GAN'05, 05/10/2005 26
Characteristics of collected traces (2) • Classification: one trace presents over 50% “some type” of patterns. Type #traces % Rate Control 301 Congestion Avoidance 30 Mixed or Congestion Control 130 Total 461 100. 00% TMH - GAN'05, 05/10/2005 Comments 65. 29% 35 traces (7. 59%) have big gaps (> 10 RTTs) 6. 51% 28. 20% 51 traces (11. 06%) are very low in volume (up to 8~12 pkts/RTT (vs ~44 pkts/RTT)) 27
Some Trace Patterns (300 RTTs) TMH - GAN'05, 05/10/2005 Under-estimated RTT; 100 RTTs 28
Results (0. 5) – predict next 100 RTTs at different time per RTT throughput Aggregate Moving Average EWMA TCP Pattern TMH - GAN'05, 05/10/2005 29
Results (1. 5) – predict next 400 RTTs at different time per RTT throughput Aggregate Moving Average EWMA TCP Pattern TMH - GAN'05, 05/10/2005 30
Bandwidth n Bandwidth: ¨ The amount of data that can be pushed through a link in unit time. Usually measured in bits or bytes per second. Bottleneck Bandwidth (BB) n Available Bandwidth (AB) n Throughput (T) n T ≤ AB ≤ BB n TMH - GAN'05, 05/10/2005 31
- Slides: 31