Performance Challenges
Performance Challenges
animation
networking
performance
Challenge Exercises
TipMeasure Real Wi-Fi Performance
Modify the code to measure actual network performance instead of simulation:
- Connect the ESP32 to your Wi-Fi network
- Send HTTP requests to a known server (like httpbin.org)
- Measure actual round-trip time using
millis() - Compare simulated results to real-world measurements
Hint: Use WiFi.h and HTTPClient.h libraries. Real measurements can be more or less variable than a chosen simulation profile; repeat under stated load and path conditions.
TipAdd Adaptive Bitrate Simulation
Implement adaptive transmission similar to video streaming:
- Monitor current network conditions (latency, loss rate)
- If conditions degrade, reduce payload size (lower “quality”)
- If conditions improve, increase payload size
- Display quality level changes on Serial Monitor
Hint: Create quality levels like “High (500 bytes)”, “Medium (200 bytes)”, “Low (50 bytes)” and switch based on measured performance.
TipImplement Congestion Control
Add TCP-like congestion control to the simulator:
- Implement slow start: Begin with small transmission rate
- Implement congestion avoidance: Gradually increase rate
- On packet loss: Cut rate in half (multiplicative decrease)
- Visualize the congestion window (CWND) changes
Hint: Research TCP Reno’s AIMD (Additive Increase Multiplicative Decrease) algorithm.
TipChallenge 4: Multi-Sensor Competition
Simulate multiple IoT sensors competing for network resources:
- Create 5 virtual sensors, each trying to send data
- Implement a simple TDMA (time division) scheduler
- Compare performance with and without scheduling
- Show whether fair queuing improves per-sensor delay and access under the chosen load; total throughput may stay the same or fall slightly from scheduling overhead
Hint: Use an array of sensor structures and cycle through them with different scheduling algorithms.