1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 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 2013 2014 2015 2016 2017 2018 2019 2020 <2021> 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Channel connection performance |
From: | "Hu, Yong via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "Veseli, Sinisa" <sveseli at anl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Tue, 26 Jan 2021 23:10:58 +0000 |
On an ordinary Linux server, I did a few tests using cothread, which is a python binding of EPICS V3 Channel Access. And I got similar results as Sinisa got: # Firstly, get a list of PVs (i.e. from a file). Connecting to 1269 PVs (which are from lots of different IOCs) takes about 0.3-seconds >>> len(pvs) 1269 >>> pvs[:10] ['ACC-TS{EVG-AcTrig}Bypass-Sel', 'ACC-TS{EVG-AcTrig}Divider-SP', 'ACC-TS{EVG-AcTrig}Phase-SP', 'ACC-TS{EVG-AcTrig}SyncSrc-Sel', 'ACC-TS{EVG-Dbus:0}Map-Sel', 'ACC-TS{EVG-Dbus:0}MapConv-Sel_', 'ACC-TS{EVG-Dbus:0}Omsl-FOut', 'ACC-TS{EVG-Dbus:0}Src-Sel',
'ACC-TS{EVG-Dbus:1}Map-Sel', 'ACC-TS{EVG-Dbus:1}MapConv-Sel_'] >>> from cothread.catools import connect >>> import time >>> t0=time.time(); results = connect(pvs, cainfo=True, throw=False); t1=time.time(); print(t1-t0) 0.299956083298 # another test on 38380 PVs: connection takes less than 7-seconds >>> len(pvs) 38380 >>> t0=time.time(); results = connect(pvs, cainfo=True, throw=False); t1=time.time(); print(t1-t0) 6.67425608635 http://controls.diamond.ac.uk/downloads/python/cothread/ From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> Hi, If you are already using pvaClientCPP, you could also take a look at the MultiChannel class (examples can be found here:
https://github.com/epics-base/exampleCPP/tree/master/exampleClient/src) Here is how long it takes on my machine to connect and retrieve values for 1000 CA channels using pvapy (both client and IOC are running on the same machine): >>> import time >>> from pvaccess import * >>> cList = ['X%s' % i for i in range (1,1001)] >>> c = MultiChannel(cList, CA) >>> t0 = time.time(); pv=c.get(); t1=time.time() ; print(t1-t0) 0.21088194847106934 >>> Sinisa -- Siniša Veseli Scientific Software Engineering & Data Management Advanced Photon Source Argonne National Laboratory sveseli at anl.gov (630)252-9182 From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Michael Davidsaver via Tech-talk <tech-talk at aps.anl.gov> On 1/25/21 11:00 AM, Axel Terfloth via Tech-talk wrote: |