1 / 16

Soft Timers: Efficient Microsecond Software Timer Support For Network Processing

Soft Timers: Efficient Microsecond Software Timer Support For Network Processing. Mohit Aron and Peter Druschel Rice University. Presented By Oindrila Mukherjee. Outline. Why Soft Timers? What are Soft Timers? Conventional Timers and Associated Problems Soft Timer Mechanism

omar-welch
Download Presentation

Soft Timers: Efficient Microsecond Software Timer Support For Network Processing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented By Oindrila Mukherjee

  2. Outline • Why Soft Timers? • What are Soft Timers? • Conventional Timers and Associated Problems • Soft Timer Mechanism • Problems with Soft Timers • Soft Timer Operations • Soft Timer Applications • Rate-Based Clocking • Network Polling • Experimental Results • Conclusion

  3. Why Soft Timers ? • I/O Management can be done by: • Interrupts • + Low latency • - High context switching overhead • Polling • + Avoids Interrupts • - Possibility of high latency • Neither overheads acceptable for high performance time-sensitive applications. • Solution : Use Soft Timers

  4. What are Soft Timers ? • New OS facility that allows efficient scheduling of software events. • Avoids interrupts and reduces context switches. • Enables efficient performance of rate-based clocking. • Can be used to perform network polling.

  5. Conventional Timers • Invokes designated event handlers periodically in the context of a hardware interrupt. • Causes high CPU overhead due to: • Saving state and restoring state. • Cache/TLB pollution.

  6. Soft Timer Mechanism • Before returning to user mode the kernel checks for and executes pending events. • Uses concept of trigger states. • System calls. • Exception handling (eg. TLB or page fault). • Interrupt handler associated with a device interrupt. • The CPU going idle. • No hardware interrupt.

  7. Soft Timer Mechanism (contd.) • Invoking event handler equivalent to function call. • Soft timer facility checks for pending soft timer events . • Associated handler invoked without cost of hardware interrupt. • Soft Timer checks have no significant impact on system performance.

  8. Problems with Soft Timers • Invoking of event handler may be delayed past its scheduled time. • Trade-off between accuracy and overhead. • Solution: Maximal delay experienced by a soft timer is bounded - low frequency hardware timer schedules overdue events. • Events scheduled at a much finer granularity than periodic hardware interrupts Soft timer polling latency Trigger states Event Scheduled

  9. Soft Timer Operations • Measure_resolution() – returns the 64-bit resolution (in Hz) of the clock . • Measure_time() – returns the 64-bit current real time . • Schedule_soft_event (T, h) – schedules handler h to be called at least T ticks in future. • Interrupt_clock_resolution() – gives the expected minimal resolution (in Hz). Equal to frequency of “back up” timer interrupt. ( Interval > T + 1 ) => event fired X = measure_time() Event Scheduled

  10. Soft Timer Applications - Rate-Based Clocking • Packet Transmission at a scheduled rate. • Current TCP implementations are self- clocking. • Essential for TCP implementations: • Allows sender to skip slow-start phase. • Overcomes effects of ACK compression and big ACKs. • Increases network utilization and performance on high speed WANs. • Conventional approach – schedule periodic hardware timer events – unacceptable overheads.

  11. Rate Based Clocking using Soft Timers • Soft timers allow clocked transmission of packets with low overhead. • Algorithm used: • Protocol maintains running average of actual transmission rate. • Events scheduled to achieve target transmission rate. • If actual rate < target rate, then next transmission interval = maximum allowable rate.

  12. Soft Timer Applications – Network Polling • System periodically reads network interfaces’ status registers. • Avoids interrupts. • May increase latency. • Use hybrid approach – interrupts under normal network load and polling under overload.

  13. Soft Timer Based Network Polling • Algorithm used: • Soft timer event polls network interface. • Avoids network interrupts. • Improves memory access locality. • Communication latency similar to interrupt-driven network processing. • Aggregation quota dynamically selected.

  14. Experimental Results off-chip timer on-chip timer • Hardware timer overhead does not scale with CPU speed. • Relative cost increases as CPU gets faster. • Base overhead imposed by soft timer is negligible.

  15. Experimental Results (contd.)

  16. Conclusion • Soft timers allow the efficient scheduling of events at granularity below that of conventional timers. • Useful range of soft timer event granularity appears to widen as CPUs get faster. • They take advantage of trigger states and invokes handlers at low cost. • Soft timers can be integrated with an existing conventional interval timer facility.

More Related