Efficient Microsecond Software Timer Support For Network

31
Soft Timers: Efficient Microsecond Software Timer Support for Network Processing Paper by: Mohit Aron and Peter Druschel of Rice University Presenter: Billy Cheung

Transcript of Efficient Microsecond Software Timer Support For Network

Page 1: Efficient Microsecond Software Timer Support For Network

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

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

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

ScalaServer:

System Support for Scalable Network Servers

http://www.cs.rice.edu/CS/Systems/ScalaServer/

Page 5: Efficient Microsecond Software Timer Support For Network

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

Periodic Timer

Page 7: Efficient Microsecond Software Timer Support For Network

Soft Timer

Page 8: Efficient Microsecond Software Timer Support For Network

One-Shot Timer

Page 9: Efficient Microsecond Software Timer Support For Network

One Timer

Page 10: Efficient Microsecond Software Timer Support For Network

Two Timers

Page 11: Efficient Microsecond Software Timer Support For Network

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

Based on Convenience/Laziness

Page 13: Efficient Microsecond Software Timer Support For Network

Trigger States

Page 14: Efficient Microsecond Software Timer Support For Network

Timing Wheels

Page 15: Efficient Microsecond Software Timer Support For Network

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

Disadvantages?

Page 17: Efficient Microsecond Software Timer Support For Network

Maximum Bound Time:

Governed by periodic interrupt

Page 18: Efficient Microsecond Software Timer Support For Network

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

Why do we need them?

Page 20: Efficient Microsecond Software Timer Support For Network

Interrupts and context switches are expensive

Page 21: Efficient Microsecond Software Timer Support For Network

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

Rate-based Clocking

Page 23: Efficient Microsecond Software Timer Support For Network

Problem: ACK Compression

Page 24: Efficient Microsecond Software Timer Support For Network

Problem: big ACKs

Page 25: Efficient Microsecond Software Timer Support For Network

Problem: Slow start is slow

Page 26: Efficient Microsecond Software Timer Support For Network

Network Polling

Page 27: Efficient Microsecond Software Timer Support For Network

Problem: Transmit/Receiver Interrupts common

Page 28: Efficient Microsecond Software Timer Support For Network

Problem: Polling can cause horrible latency problems (especially with

anything you need real-time)

Page 29: Efficient Microsecond Software Timer Support For Network

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

Soft Timers work.

Page 31: Efficient Microsecond Software Timer Support For Network

• 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