SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Hashed and Hierarchical Timing Wheels  A paper by   George Varghese  and   Tony Lauck
Motivation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Model & Performance Measure ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Currently Used Timer Schemes a b c d e Can maintain absolute expiry  time or the timer interval START_TIMER = O(1) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(n) a b c d e f maintain absolute expiry time START_TIMER = O(n) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(1)
Tree based timers a b c d a b c d maintain absolute expiry  time  START_TIMER = O(log(n)) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(1) Can degenerate to a  linear list in case of equal Interval timers START_TIMER = O(n) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(1)
Simple Timing Wheel ,[object Object],[object Object],[object Object],[object Object],START_TIMER = O(1) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(1) 1 2 3 4 5 6 7 0
Hashed Timing Wheel ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],1 2 3 4 5 6 7 0 2 4 1 2 2 1 1 2 # of rounds remaining
Hashed Timing Wheel ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Hierarchical Timing Wheel 1 2 3 4 5 6 7 0 3 5 7 5 2 1 1 Hours wheel 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 Minutes wheel Seconds wheel 1 3 3 5 3 7 1 5
Hierarchical Timing Wheels ,[object Object],[object Object],[object Object],[object Object]
Comparison START_TIMER STOP_TIMER PER_TICK O(1) Straight Fwd O(1) O(n) Sequential List O(n) O(1) O(1) Tree Based O(log(n)) O(1) O(1) Simple Wheel O(1) O(1) O(1) High memory requirement Hashed Wheel (sorted) Hashed Wheel (unsorted) Hierarchical Wheels O(n) worst case O(1) avg O(1) O(m) O(1) O(1) O(1) O(1) O(n) worst case O(1) avg O(1)

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

How Scylla Make Adding and Removing Nodes Faster and Safer
How Scylla Make Adding and Removing Nodes Faster and SaferHow Scylla Make Adding and Removing Nodes Faster and Safer
How Scylla Make Adding and Removing Nodes Faster and Safer
 
Understanding DPDK
Understanding DPDKUnderstanding DPDK
Understanding DPDK
 
Netcat - A Swiss Army Tool
Netcat - A Swiss Army ToolNetcat - A Swiss Army Tool
Netcat - A Swiss Army Tool
 
DPDK In Depth
DPDK In DepthDPDK In Depth
DPDK In Depth
 
Debug dpdk process bottleneck & painpoints
Debug dpdk process bottleneck & painpointsDebug dpdk process bottleneck & painpoints
Debug dpdk process bottleneck & painpoints
 
Linux BPF Superpowers
Linux BPF SuperpowersLinux BPF Superpowers
Linux BPF Superpowers
 
eBPF maps 101
eBPF maps 101eBPF maps 101
eBPF maps 101
 
LISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceLISA2019 Linux Systems Performance
LISA2019 Linux Systems Performance
 
Apache Cassandra - Diagnostics and monitoring
Apache Cassandra - Diagnostics and monitoringApache Cassandra - Diagnostics and monitoring
Apache Cassandra - Diagnostics and monitoring
 
BPF Internals (eBPF)
BPF Internals (eBPF)BPF Internals (eBPF)
BPF Internals (eBPF)
 
DoS and DDoS mitigations with eBPF, XDP and DPDK
DoS and DDoS mitigations with eBPF, XDP and DPDKDoS and DDoS mitigations with eBPF, XDP and DPDK
DoS and DDoS mitigations with eBPF, XDP and DPDK
 
PostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication CheatsheetPostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication Cheatsheet
 
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
 
Ixgbe internals
Ixgbe internalsIxgbe internals
Ixgbe internals
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at Netflix
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDK
 
Introduction to eBPF and XDP
Introduction to eBPF and XDPIntroduction to eBPF and XDP
Introduction to eBPF and XDP
 
Kernel Proc Connector and Containers
Kernel Proc Connector and ContainersKernel Proc Connector and Containers
Kernel Proc Connector and Containers
 
PostgreSQL and RAM usage
PostgreSQL and RAM usagePostgreSQL and RAM usage
PostgreSQL and RAM usage
 
[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive
 

Andere mochten auch

xUnitTestPattern/chapter17
xUnitTestPattern/chapter17xUnitTestPattern/chapter17
xUnitTestPattern/chapter17
Yoon Hee Hwang
 
그녀가언어를익히는방법
그녀가언어를익히는방법그녀가언어를익히는방법
그녀가언어를익히는방법
Yoon Hee Hwang
 
[아꿈사/110903] 도메인주도설계 4장
[아꿈사/110903] 도메인주도설계 4장[아꿈사/110903] 도메인주도설계 4장
[아꿈사/110903] 도메인주도설계 4장
sung ki choi
 
ApprenticeshipPatterns/Chapter3
ApprenticeshipPatterns/Chapter3ApprenticeshipPatterns/Chapter3
ApprenticeshipPatterns/Chapter3
Yoon Hee Hwang
 

Andere mochten auch (12)

AnáLisis De Algoritmos1
AnáLisis De Algoritmos1AnáLisis De Algoritmos1
AnáLisis De Algoritmos1
 
xUnitTestPattern/chapter17
xUnitTestPattern/chapter17xUnitTestPattern/chapter17
xUnitTestPattern/chapter17
 
그녀가언어를익히는방법
그녀가언어를익히는방법그녀가언어를익히는방법
그녀가언어를익히는방법
 
Nodejs_chapter3
Nodejs_chapter3Nodejs_chapter3
Nodejs_chapter3
 
[아꿈사/110903] 도메인주도설계 4장
[아꿈사/110903] 도메인주도설계 4장[아꿈사/110903] 도메인주도설계 4장
[아꿈사/110903] 도메인주도설계 4장
 
제프리 리처의 Windows via C/C++ : 8장 유저 모드에서의 스레드 동기화
제프리 리처의 Windows via C/C++ : 8장 유저 모드에서의 스레드 동기화제프리 리처의 Windows via C/C++ : 8장 유저 모드에서의 스레드 동기화
제프리 리처의 Windows via C/C++ : 8장 유저 모드에서의 스레드 동기화
 
[111015/아꿈사] HTML5를 여행하는 비(非) 웹 개발자를 위한 안내서 - 1부 웹소켓.
[111015/아꿈사] HTML5를 여행하는 비(非) 웹 개발자를 위한 안내서 - 1부 웹소켓.[111015/아꿈사] HTML5를 여행하는 비(非) 웹 개발자를 위한 안내서 - 1부 웹소켓.
[111015/아꿈사] HTML5를 여행하는 비(非) 웹 개발자를 위한 안내서 - 1부 웹소켓.
 
[120316] node.js 프로그래밍 5장
[120316] node.js 프로그래밍 5장[120316] node.js 프로그래밍 5장
[120316] node.js 프로그래밍 5장
 
[아꿈사] 게임 기초 수학 물리 1,2장
[아꿈사] 게임 기초 수학 물리 1,2장[아꿈사] 게임 기초 수학 물리 1,2장
[아꿈사] 게임 기초 수학 물리 1,2장
 
트위터 봇 개발 후기
트위터 봇 개발 후기트위터 봇 개발 후기
트위터 봇 개발 후기
 
ApprenticeshipPatterns/Chapter3
ApprenticeshipPatterns/Chapter3ApprenticeshipPatterns/Chapter3
ApprenticeshipPatterns/Chapter3
 
Project Panama - Beyond the (JVM) Wall
Project Panama - Beyond the (JVM) WallProject Panama - Beyond the (JVM) Wall
Project Panama - Beyond the (JVM) Wall
 

Ähnlich wie Timing wheels

Lecture 13 14-time_domain_analysis_of_1st_order_systems
Lecture 13 14-time_domain_analysis_of_1st_order_systemsLecture 13 14-time_domain_analysis_of_1st_order_systems
Lecture 13 14-time_domain_analysis_of_1st_order_systems
Saifullah Memon
 

Ähnlich wie Timing wheels (20)

时间轮
时间轮时间轮
时间轮
 
time_complexity_list_02_04_2024_22_pages.pdf
time_complexity_list_02_04_2024_22_pages.pdftime_complexity_list_02_04_2024_22_pages.pdf
time_complexity_list_02_04_2024_22_pages.pdf
 
Standard cells library design
Standard cells library designStandard cells library design
Standard cells library design
 
Dinamica rotacional
Dinamica rotacionalDinamica rotacional
Dinamica rotacional
 
TensorFlow 2: New Era of Developing Deep Learning Models
TensorFlow 2: New Era of Developing Deep Learning ModelsTensorFlow 2: New Era of Developing Deep Learning Models
TensorFlow 2: New Era of Developing Deep Learning Models
 
3. guia de_laboratorio_-_movimiento_perpetuo_navarrete_jonathan_
3. guia de_laboratorio_-_movimiento_perpetuo_navarrete_jonathan_3. guia de_laboratorio_-_movimiento_perpetuo_navarrete_jonathan_
3. guia de_laboratorio_-_movimiento_perpetuo_navarrete_jonathan_
 
AVR_Course_Day7 timers counters and interrupt programming
AVR_Course_Day7 timers counters and  interrupt programmingAVR_Course_Day7 timers counters and  interrupt programming
AVR_Course_Day7 timers counters and interrupt programming
 
8051 ch9-950217
8051 ch9-9502178051 ch9-950217
8051 ch9-950217
 
VIPER S650 report
VIPER S650 reportVIPER S650 report
VIPER S650 report
 
ControlLogix Timers FA16
ControlLogix Timers FA16ControlLogix Timers FA16
ControlLogix Timers FA16
 
L15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 pL15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 p
 
Avr timers
Avr timersAvr timers
Avr timers
 
timer counter (1).pptx
timer counter (1).pptxtimer counter (1).pptx
timer counter (1).pptx
 
Avg q lenth
Avg q lenthAvg q lenth
Avg q lenth
 
Chapter 08
Chapter 08Chapter 08
Chapter 08
 
Algorithim lec1.pptx
Algorithim lec1.pptxAlgorithim lec1.pptx
Algorithim lec1.pptx
 
Lecture 13 14-time_domain_analysis_of_1st_order_systems
Lecture 13 14-time_domain_analysis_of_1st_order_systemsLecture 13 14-time_domain_analysis_of_1st_order_systems
Lecture 13 14-time_domain_analysis_of_1st_order_systems
 
9.Sorting & Searching
9.Sorting & Searching9.Sorting & Searching
9.Sorting & Searching
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
 
Maqueta en componentes normal y tangencial
Maqueta en componentes normal y tangencialMaqueta en componentes normal y tangencial
Maqueta en componentes normal y tangencial
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Timing wheels

  • 1. Hashed and Hierarchical Timing Wheels A paper by George Varghese and Tony Lauck
  • 2.
  • 3.
  • 4. Currently Used Timer Schemes a b c d e Can maintain absolute expiry time or the timer interval START_TIMER = O(1) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(n) a b c d e f maintain absolute expiry time START_TIMER = O(n) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(1)
  • 5. Tree based timers a b c d a b c d maintain absolute expiry time START_TIMER = O(log(n)) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(1) Can degenerate to a linear list in case of equal Interval timers START_TIMER = O(n) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(1)
  • 6.
  • 7.
  • 8.
  • 9. Hierarchical Timing Wheel 1 2 3 4 5 6 7 0 3 5 7 5 2 1 1 Hours wheel 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 Minutes wheel Seconds wheel 1 3 3 5 3 7 1 5
  • 10.
  • 11. Comparison START_TIMER STOP_TIMER PER_TICK O(1) Straight Fwd O(1) O(n) Sequential List O(n) O(1) O(1) Tree Based O(log(n)) O(1) O(1) Simple Wheel O(1) O(1) O(1) High memory requirement Hashed Wheel (sorted) Hashed Wheel (unsorted) Hierarchical Wheels O(n) worst case O(1) avg O(1) O(m) O(1) O(1) O(1) O(1) O(n) worst case O(1) avg O(1)