EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Polling CA client library in nonpreemptive mode at less than 10 Hz
From: Andrew Johnson <[email protected]>
To: <[email protected]>
Date: Fri, 7 Nov 2014 15:24:37 -0600
On 11/07/2014 11:46 AM, J. Lewis Muir wrote:
> What is the consequence of polling the CA client library at a rate
> slower than 10 Hz when in nonpreemptive mode?
> 
> The "EPICS Channel Access Reference Manual" says in the section "Polling
> the CA Client Library From Single Threaded Applications" the following:
> 
>   "If preemptive call back is not enabled, then for proper operation
>    CA must periodically be polled to take care of background
>    activity. This requires that your application must either wait
>    in one of ca_pend_event(), ca_pend_io(), or ca_sg_block()
>    or alternatively it must call ca_poll() at least every 100
>    milli-seconds." [1]
> 
> It's one thing to try for this minimum poll rate but quite a different
> thing to guarantee it.

You aren't expected to guarantee it, but if your application is busy
doing other things the client library can't call your callbacks (because
in single-threaded mode it can only run callbacks when your application
has called into one of the routines listed above). 10Hz is not
essential, you can make it 1Hz if you like, but your users might start
to notice that big of a delay.

You will see "virtual circuit disconnected" errors from libca if you
don't call into it often enough, and your channels will disconnect. You
will also find network data can start to build up inside your IOCs and
may cause problems there if the client is monitoring any high-volume
channels. I believe that "often enough" is on the order of once every 15
- 30 seconds, but I would aim for at least once every 10 seconds even on
a low-volume client, and preferably nearer 1Hz if you can.

- Andrew
-- 
People everywhere confuse what they read in newspapers with news.
-- A. J. Liebling

References:
Polling CA client library in nonpreemptive mode at less than 10 Hz J. Lewis Muir

Navigate by Date:
Prev: Re: Permissible in C to call CA I/O functions from callback? Andrew Johnson
Next: RE: Serial device server timeouts, overwhelmed by load? jon
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Polling CA client library in nonpreemptive mode at less than 10 Hz J. Lewis Muir
Next: CA reference manual mystery function: ca_sg_pend J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·