Boost C++ Libraries: Ticket #4205: Excessive CPU using in run_one in ASIO https://svn.boost.org/trac10/ticket/4205 <p> OS: Windows Server 2003 </p> <p> In the windows code for run_one, we are seeing excessive CPU when using timers. We didn't see this issue with 1.40. </p> <p> The problem turns out to be that when we have timers, the computation for timeout (via get_timeout()), is too small. Thus the IOCP query returns and no timers are delivered. This leads to a flurry of CPU usage where the timeout is zero and no timers are still delivered. The CPU usage stops when the next pending timer is finally delivered. </p> <p> To resolve the issue (a total temporary hack to our code), we added a bias of 1ms to the call to get_timeout(). (i.e. timeout = get_timeout() + 1;). This caused the CPU usage to drop back down to normal levels. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4205 Trac 1.4.3 Tim Smith <tim@…> Tue, 11 May 2010 17:17:36 GMT version changed https://svn.boost.org/trac10/ticket/4205#comment:1 https://svn.boost.org/trac10/ticket/4205#comment:1 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.44.0</span> → <span class="trac-field-new">Boost 1.43.0</span> </li> </ul> Ticket chris_kohlhoff Sun, 06 Jun 2010 23:29:02 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4205#comment:2 https://svn.boost.org/trac10/ticket/4205#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/62497" title="Fix handling of small but non-zero timeouts. Fixes #4205. ">[62497]</a>) Fix handling of small but non-zero timeouts. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4205" title="#4205: Bugs: Excessive CPU using in run_one in ASIO (closed: fixed)">#4205</a>. </p> Ticket chris_kohlhoff Wed, 09 Jun 2010 09:41:14 GMT <link>https://svn.boost.org/trac10/ticket/4205#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4205#comment:3</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/62644" title="Merge from trunk. ........ r62497 | chris_kohlhoff | 2010-06-07 ...">[62644]</a>) Merge from trunk. </p> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/62497" title="Fix handling of small but non-zero timeouts. Fixes #4205. ">r62497</a> | chris_kohlhoff | 2010-06-07 09:28:58 +1000 (Mon, 07 Jun 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Fix handling of small but non-zero timeouts. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4205" title="#4205: Bugs: Excessive CPU using in run_one in ASIO (closed: fixed)">#4205</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/62499" title="Reworked implementation MkII ">r62499</a> | chris_kohlhoff | 2010-06-07 10:00:45 +1000 (Mon, 07 Jun 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Reworked implementation MkII. Also fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4170" title="#4170: Bugs: Error using null_buffers in async_send_to in Windows (closed: fixed)">#4170</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/62530" title="Fixes for MSVC 7.1, Borland. ">r62530</a> | chris_kohlhoff | 2010-06-08 09:24:28 +1000 (Tue, 08 Jun 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Fixes for MSVC 7.1, Borland. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/62531" title="Some changes for Symbian support. ">r62531</a> | chris_kohlhoff | 2010-06-08 09:29:05 +1000 (Tue, 08 Jun 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Some changes for Symbian support. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/62549" title="Fix typo in tutorial. Refs #4252. ">r62549</a> | chris_kohlhoff | 2010-06-08 14:27:26 +1000 (Tue, 08 Jun 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Fix typo in tutorial. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4252" title="#4252: Bugs: Typoo in boost::asio tutorial (closed: fixed)">#4252</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/62556" title="Ensure unsigned char is used with isdigit. Refs #4201. ">r62556</a> | chris_kohlhoff | 2010-06-08 19:01:39 +1000 (Tue, 08 Jun 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Ensure unsigned char is used with isdigit. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4201" title="#4201: Bugs: boost/asio/detail/socket_ops.hpp:1305: isdigit called with char, not ... (closed: fixed)">#4201</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/62558" title="Fix handling of empty buffer sequences. ">r62558</a> | chris_kohlhoff | 2010-06-08 21:01:57 +1000 (Tue, 08 Jun 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Fix handling of empty buffer sequences. </p> </blockquote> <p> ........ </p> </description> <category>Ticket</category> </item> </channel> </rss>