The tw_timer implementation is extremely fast. We routinely test it to 60 million concurrent timers, the number required to bring up 10M TCP sessions.
Given a 500ms granularity, we have: max range = 86400 (secs/day) * 2 (clock ticks/second) = 172800 slots. A 2-ring, 512 slots/ring geometry would work. You can #include <vppinfra/tw_timer_16t_2w_512sl.h> and use that wheel geometry verbatim, so long as each object needs at most 16 independent timers. Look at .../src/vppinfra/test_tw_timer.c for an example which using this specific ring geometry. It’s the “double_wheel” test-case. You’ll probably need/want to add either a process node which wakes up every half second to run the tw_timer wheel, or an input node. Unless you have super-high perf / scale targets, go with the process node. HTH... Dave From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Andreas Schultz Sent: Monday, August 13, 2018 11:54 AM To: vpp-dev@lists.fd.io Subject: [vpp-dev] timing_wheel or tw_timer Hi, I need to implement per session timers with about 500ms granularity. Maximum timer range can be up to 24 hours. Should I use the timing_wheel (like BFD does) or one of the tw_timer's? And what is main difference between the timing_wheel and the tw_timer anyway? Thanks Andreas -- -- Dipl.-Inform. Andreas Schultz ----------------------- enabling your networks ---------------------- Travelping GmbH Phone: +49-391-81 90 99 0 Roentgenstr. 13 Fax: +49-391-81 90 99 299 39108 Magdeburg Email: i...@travelping.com<mailto:i...@travelping.com> GERMANY Web: http://www.travelping.com Company Registration: Amtsgericht Stendal Reg No.: HRB 10578 Geschaeftsfuehrer: Holger Winkelmann VAT ID No.: DE236673780 ---------------------------------------------------------------------
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#10131): https://lists.fd.io/g/vpp-dev/message/10131 Mute This Topic: https://lists.fd.io/mt/24504301/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-