# CS 176C:
Measuring Broadband Internet Performance
<!-- Put the link to this slide here so people can follow -->
[Slides](https://hackmd.io/@arpitgupta/BkFDa7RK8?type=slide)
---
## Learning Objectives
- Basics
- Overview of measurement infrastructure and tools
- Throughput measurements
- Learn how to measure/analyse throughput
- Latency measurements
- Learn how to measure/analyse latency
- PowerBoost
- Basics of PowerBoost
---
# Basics
---
## Why?
- Affects (almost) all of us
- basic necessity
- Is unfair (rural vs. urban)
- data-driven policy-making
- Is complex
- one-time measurements are not enough
---
## Where?
![](https://i.imgur.com/4gSw5qV.png =450x)
Measure at Gateway
- Directly measure access link
- Longitudinal measurements
- Lesser target diversity
---
## How?
![](https://i.imgur.com/Grw0jxL.png =350x)
- Volunteer-driven recruiting
- distribute gateway routers for free (scale?)
- Two infrastructures
- SamKnows (6-7K+)--still active
- BISMark (500+)--dead now
---
# Throughput
---
## How to measure?
- single-threaded HTTP
- multi-threaded HTTP
- passive throughput
- #bytes/transfer-time
- UDP capacity
- [Spacerprobe](https://dl.acm.org/doi/abs/10.1145/2068816.2068860)
---
## Measurement Challenges (1)
![](https://i.imgur.com/VHbWKez.png)
Througput measurements sensitive to techniques
---
## Measurement Challenges (2)
![](https://i.imgur.com/rATYnJT.png =450x)
Packet losses have a significant impact on throughput
---
## Throughput Performance (1)
### What performance do users achieve?
![](https://i.imgur.com/0eYYh5Z.png =400x)
Considerable variation even within a single service plan
---
## Throughput Performance (2)
### Is performance consistent?
![](https://i.imgur.com/tu68gPP.png)
Mostly consistent, with some exceptions
---
## Throughput Performance (3)
### Why inconsistent?
![](https://i.imgur.com/UwI6nkH.png)
Loss increases during peak hours (why?)
---
# Latency
---
## Measuring Latencies
- How to measure?
- Send 600 UDP packets/hour
- Send 5 ICMP ping packets/hour
- What to measure?
- end-to-end path latency
- last-mile latency
- latency under load
---
## Why Latency Matters?
![](https://i.imgur.com/dy3Zi2Y.png =450x)
Page load time **very** sensitive to latency
---
## What about Throughput?
![](https://i.imgur.com/t5lxWd6.png =450x)
Page load time saturates at around 6 Mbps
---
## Last Mile Latency
![](https://i.imgur.com/BRrWMb6.png =350x)
- Last-mile is 40-80 % of end-to-end latency
- High variance --> shared medium
---
## Latency Under Load
### Oversized buffers
- Types
- Downstream buffers (CMTS, DSLAM)
- Upstream buffers (cable modems, DSL)
- Impact of buffers evident only under load (why?)
---
## Prevalence of Oversized Buffers
---![](https://i.imgur.com/OYEyMS0.png =400x)
Up to two orders of magnitude inflation
- Why is inflation more for upload?
- Why variability for ATT higher than Comcast?
---
## Understanding Latency Inflations (1)
- Measure Broadband America
- Experiment
- Use ICMP `ping` (2-10 packets/s)
- After 30 seconds, use `iperf` to flood uplink with UDP traffic (1-10 Mbps)
- Stop `iperf` after 60 seconds
- Measure latency for another 30 seconds
---
## Understanding Latency Inflations (2)
![](https://i.imgur.com/fmTY4bG.png)
Different modems affect latency inflations differently (why?)
---
# PowerBoost
---
## What is PowerBoost?
- Marketing term for traffic shaping
- Types
- Uncapped
- simple token bucket
- Capped
- token + leaky bucket
---
## Powerboost Deep Dive (1)
### Terms
- PBS: Powerboost bucket size
- MSTR: Maximum sustained data rate
- R: capped/uncapped data rate
---
## Powerboost Deep Dive (1)
### Metrics of Interests
- Powerboost duration, D = $\frac{PBS}{R-MSRT}$
- Powerboost bytes, B = $R.D$
- Refill time, RT = $\frac{PBS}{MSRT}$
---
## Powerboost Deep Dive (2)
### Example
- Given R = 15 Mbps, MSTR = 12 Mbps, PBS = 12MB
- Duration of powerboost? (32 seconds)
- Number of bytes sent at higher rate?(60 MB)
- Refill time?(8 seconds)
---
## Impact on Throughput (1)
![](https://i.imgur.com/byI5zDm.png =400x)
Different modems see powerboost differently
- D-LINK modem
- 21 Mbps for 3 seconds
- 18.5 Mbps for 14s seconds
- 12.5 Mbps for remainder duration
---
## Impact on Throughput (2)
- D-LINK has two token buckets
- B1 $\rightarrow$ B1
- Link capacity: 21 Mbps
- Buckets:
- (18.5 Mbps, D=3 s)
- (12.5 Mbps, D=14s)
---
## Impact on Throughput (2)
- Computing PBS
- $PBS=D.(R-MSRT)$
- PBS1 = $\frac{3.(2.5)}{8}\sim 1$ MB
- PBS2 = $\frac{14.(6)}{8}\sim 10$ MB
---
## Impact on Latency (Under Load)
![](https://i.imgur.com/F0OuCg1.png)
Lower latency during powerboost
---
## Summary
- We learned
- Measurement infrastructure
- Throughput measurements
- Latency measurements
- PowerBoost
- Next
- Deep dive into throughput measurement challenges
{"metaMigratedAt":"2023-06-15T07:41:51.919Z","metaMigratedFrom":"YAML","title":"Measuring Broadband Internet Performance","breaks":true,"description":"View the slide with \"Slide Mode\".","contributors":"[{\"id\":\"146fbaf9-ce29-4e56-80ea-3c668b75e985\",\"add\":6573,\"del\":1388}]"}