Re: [asio-users] Do idle timers affect performance?
Brought to you by:
chris_kohlhoff
From: Bob P. <gra...@gm...> - 2010-09-24 13:48:13
|
On Thu, Sep 23, 2010 at 12:45 PM, Igor R <boo...@gm...> wrote: >> Presumably if you have a lot of timers set to expire very close to each other you may see some sort of pseudo thundering herd effect. A possible solution would be to provide the io_service with more thread resources, though that itself has the obvious flaw that there may be a greater amount of overhead due to synchronisation techniques and servicing of threads. If you're working in the ultra high frequency domains of computing you'll quickly learn that it is a very delicate balancing act. > > Thanks for your answer. I understand that simultaneous "waking" of > many timers might be problematic. You might be interested in this old article: Gene Tucciarone, "Constant Time Software Interval Timers" Embedded System Design Vol. 9 No. 6, June 1996 http://leadingedgeinnovations.biz/EmbeddedSystemProgramming/files/96/9606/f-tuccia.pdf A phone system might have tens of thousands of timers running at any given time, as an example. [At which point I'd use Erlang for a phone system.] In light of that article how does ASIO handle timers? There are many variation such as constant time to set regardless of the number running etc. > My question, however, related to some other issue: if I create > thousands of deadline_timer's (on the same io_service), and never > start them, will they affect somehow the performance of that > io_service? |