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  <20132014  2015  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  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: FW: Gige performance increasing.
From: Andrew Johnson <[email protected]>
To: [email protected]
Date: Mon, 22 Apr 2013 09:58:10 -0500
Hi Mark,

On 2013-04-20 Mark Rivers wrote:
> 
> I am totally baffled by this.  Why does it make a difference if I start the
> cameras with medm or IDL?  They should both result in similar channel
> access put operations.  Furthermore, what can the IDL put operation be
> doing that causes the cameras to suddenly begin to drop 90% of their
> frames?

Could the IDL interface be calling ca_put_callback() whereas MEDM is using a 
ca_put() call?  This would cause different things to happen inside the IOC.

> I see one other behavior that I don't understand.  When I use the "caput"
> program from EPICS base (3.14.12.3) to write to any PV in the camera IOC I
> see about a 2 second delay before the caput completes:
> 
> corvette:~>date ; /usr/local/epics/base-3.14.12.3/bin/linux-x86/caput
>  13PS1:cam1:Gain.DESC "Test" ; date Sat Apr 20 08:58:54 CDT 2013
> Old : 13PS1:cam1:Gain.DESC           Test
> New : 13PS1:cam1:Gain.DESC           Test
> Sat Apr 20 08:58:56 CDT 2013
> 
> Note that "date" is reporting that this operation took about 2 seconds. 
> There is a very noticeable delay between when the "New" value of the PV is
> printed, and when the Linux shell prompt returns.  Why?  This happens when
> all 3 cameras are not acquiring, so it cannot be a problem with Ethernet
> loading.  It happens whether the camera IOCs are running on Windows or
> Linux.

The caput program closes the CA connection to the IOC before it exits, thus it 
has to wait for the IOC to accept and reply to its closure message.  If the 
IOC is busy doing other things it might take some time before the CA thread 
gets a chance to run and handle that, thus I think this could explain the 
delay there.

> I wonder if this could be related to the problem I am seeing with IDL
> starting the cameras?

Try it connecting to a VxWorks IOC that is heavily loaded, that might cause a 
similar shut-down delay.  However even there I could understand if the 
behavior is different, because the OS schedules threads differently; Linux is 
usually optimized for throughput, not real-time response, so it can let lower 
priority threads continue to run even when there is higher priority work that 
can be done.  You could try running the Linux IOC as a real-time process, for 
which there are some instructions on the Wiki here:

https://wiki-
ext.aps.anl.gov/epics/index.php/How_To_Use_Posix_Thread_Priority_Scheduling_under_Linux

HTH,

- Andrew
-- 
It is difficult to get a man to understand something, when his salary
depends upon his not understanding it. -- Upton Sinclair

References:
FW: Gige performance increasing. Mark Rivers
FW: Gige performance increasing. Mark Rivers

Navigate by Date:
Prev: genesys power supply IOC James F Ross
Next: RE: genesys power supply IOC Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Gige performance increasing. Ahed Aladwan
Next: RE: Gige performance increasing. Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·