EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: [Merge] ~johill-lanl/epics-base/+git/epics-base:timer-queue-fix into epics-base:7.0
From: Martin Konrad via Core-talk <core-talk at aps.anl.gov>
To: Jeff Hill <johill at lanl.gov>
Date: Fri, 24 Apr 2020 19:27:11 -0000
I haven't looked at the code, yet, but it builds fine on Ubuntu 19.10 with GCC 9.2: no warnings, all tests pass :-) A few compiler/OS combinations fail to build on Travis (https://travis-ci.com/github/mark0n/epics-base/builds/161843145) and AppVeyor (https://ci.appveyor.com/project/MartinKonrad/epics-base/builds/32416944), though.

Before digging into the code, I benchmarked the old and the proposed timer queue implementation. You can find the results here:

https://www.martin-konrad.net/nextcloud/index.php/s/mYHXWQxbJFz4LkL

The old implementation takes more than 100 us to create and start a new timer if there are already 30,000 timers in the queue (this number is based on a real-world scenario with Asyn/Stream at FRIB) and the new timer needs to be inserted at the beginning of the list (30,000 existing timers with 60 s, the new timer has 30 s duration). In this case the old code has to walk a linked list from the back all the way to the front (the code was optimized for inserting timers with the same duration). The new implementation performs two orders of magnitude better in this scenario. Not bad! None of the cases I benchmarked is performing significantly worse than with the old implementation. For comparison I also benchmarked boost::asio's timers - its performance is in the same order of magnitude.

See https://github.com/mark0n/benchmark_timerqueue for my benchmark code.
-- 
https://code.launchpad.net/~johill-lanl/epics-base/+git/epics-base/+merge/382887
Your team EPICS Core Developers is requested to review the proposed merge of ~johill-lanl/epics-base/+git/epics-base:timer-queue-fix into epics-base:7.0.

Navigate by Date:
Prev: Build failed: EPICS Base base-7.0-595 AppVeyor via Core-talk
Next: c++ thread_local and atexit() Michael Davidsaver via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Build failed: EPICS Base base-7.0-595 AppVeyor via Core-talk
Next: Re: [Merge] ~johill-lanl/epics-base/+git/epics-base:timer-queue-fix into epics-base:7.0 Martin Konrad via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 27 Apr 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·