efficient microsecond software timer support for network
TRANSCRIPT
![Page 1: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/1.jpg)
Soft Timers: Efficient Microsecond Software
Timer Support for Network Processing
Paper by: Mohit Aron and Peter Druschel of Rice University
Presenter: Billy Cheung
![Page 2: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/2.jpg)
Outline
• Background:• ScalaServer• Timers
• Key Principles• Motivation for Soft Timers• Applications in Network setting
• Rate-Based Clocking• Network Polling
• Summary/Discussion
![Page 3: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/3.jpg)
Outline
• Background:• ScalaServer• Timers
• Key Principles• Motivation for Soft Timers• Applications in Network setting
• Rate-Based Clocking• Network Polling
• Summary/Discussion
![Page 4: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/4.jpg)
ScalaServer:
System Support for Scalable Network Servers
http://www.cs.rice.edu/CS/Systems/ScalaServer/
![Page 5: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/5.jpg)
Outline
• Background:• ScalaServer• Timers
• Key Principles• Motivation for Soft Timers• Applications in Network setting
• Rate-Based Clocking• Network Polling
• Summary/Discussion
![Page 6: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/6.jpg)
Periodic Timer
![Page 7: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/7.jpg)
Soft Timer
![Page 8: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/8.jpg)
One-Shot Timer
![Page 9: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/9.jpg)
One Timer
![Page 10: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/10.jpg)
Two Timers
![Page 11: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/11.jpg)
Outline
• Background:• ScalaServer• Timers
• Key Principles• Motivation for Soft Timers• Applications in Network setting
• Rate-Based Clocking• Network Polling
• Summary/Discussion
![Page 12: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/12.jpg)
Based on Convenience/Laziness
![Page 13: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/13.jpg)
Trigger States
![Page 14: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/14.jpg)
Timing Wheels
![Page 15: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/15.jpg)
Simple Timing Wheel
• Keep a large timing wheel• A curser in the timing wheel
moves one location every time unit (just like a seconds hand in the clock)
• If the timer interval is within a rotation from the current curser position then put the timer in the corresponding location
• Requires exponential amount of memory
START_TIMER = O(1)STOP_TIMER = O(1)PER_TICK_BOOKKEEPING = O(1)
Taken from http://ieeexplore.ieee.org/iel4/90/14085/00650142.pdf?arnumber=650142
1
2
345
6
70
![Page 16: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/16.jpg)
Disadvantages?
![Page 17: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/17.jpg)
Maximum Bound Time:
Governed by periodic interrupt
![Page 18: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/18.jpg)
Outline
• Background:• ScalaServer• Timers
• Key Principles• Motivation for Soft Timers• Applications in Network setting
• Rate-Based Clocking• Network Polling
• Summary/Discussion
![Page 19: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/19.jpg)
Why do we need them?
![Page 20: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/20.jpg)
Interrupts and context switches are expensive
![Page 21: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/21.jpg)
Outline
• Background:• ScalaServer• Timers
• Key Principles• Motivation for Soft Timers• Applications in Network setting
• Rate-Based Clocking• Network Polling
• Summary/Discussion
![Page 22: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/22.jpg)
Rate-based Clocking
![Page 23: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/23.jpg)
Problem: ACK Compression
![Page 24: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/24.jpg)
Problem: big ACKs
![Page 25: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/25.jpg)
Problem: Slow start is slow
![Page 26: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/26.jpg)
Network Polling
![Page 27: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/27.jpg)
Problem: Transmit/Receiver Interrupts common
![Page 28: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/28.jpg)
Problem: Polling can cause horrible latency problems (especially with
anything you need real-time)
![Page 29: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/29.jpg)
Outline
• Background:• ScalaServer• Timers
• Key Principles• Motivation for Soft Timers• Applications in Network setting
• Rate-Based Clocking• Network Polling
• Summary/Discussion
![Page 30: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/30.jpg)
Soft Timers work.
![Page 31: Efficient Microsecond Software Timer Support For Network](https://reader036.vdocuments.net/reader036/viewer/2022062406/55901a091a28ab3b508b456b/html5/thumbnails/31.jpg)
• References:ScalaServer:
http://www.cs.rice.edu/CS/Systems/ScalaServer/
Hashed and hierarchical timing wheels: Data structures for the efficient
implementation of a timer facility:
http://portal.acm.org/citation.cfm?id=37504
Anticipatory scheduling: a disk scheduling framework to overcome
deceptive idleness in synchronous I/O:
http://portal.acm.org/ft_gateway.cfm?id=502046&type=pdf&coll=portal&dl=ACM&CFID=11111111&CFTOKEN=2222222