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 <2025> | 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 <2025> |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Handling Polling and CPU Bottleneck for Large Image Capture in areaDetector |
From: | Mark Rivers via Tech-talk <tech-talk at aps.anl.gov> |
To: | "Kim, Kuktae" <ktkim at slac.stanford.edu>, tech-talk <tech-talk at aps.anl.gov> |
Date: | Mon, 28 Apr 2025 16:37:09 +0000 |
Hi Kuktae,
The asyn port is locked during the poll cycle, so that will block the read thread and slow down acquisition. ReadStatus.SCAN reads all the GenICam features
which you probably don’t need to do.
You should be setting the SCAN field of
GC_SensorTemperature_RBV and GC_DeviceTemperature_RBV. Those are the input records.
You should first disable all the plugins and see how fast you can acquire with no plugins running. Or you can simply disable ArrayCallbacks in the driver. Then you should determine which plugins really need to run at the full frame rate, and which can run at reduced rate. For the ones that are OK to run at 5 Hz, for example, you can set the MinCallbackTime to 0.2
seconds. For plugins that need to run at the full rate you can run most of them with multiple threads. In the startup script you set MaxThreads and at runtime you can set NumThreads. If NumThreads > 1 then you need to
think about the fact the the NDArrays can be processed out of order. You can then enable sorting if that is an issue. This is all documented here: https://areadetector.github.io/areaDetector/ADCore/NDPluginDriver.html The release notes for ADCore R3-0 lists the plugins that support multiple threads and those that do not. https://github.com/areaDetector/ADCore/blob/master/RELEASE.md What is the camera model? Can you send screenshots of the OPI screen for the detector and for the ROI1 and CC1 plugins? Mark From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Kim, Kuktae via Tech-talk Hello, We are developing an areaDetector IOC for a large sensor camera (6144 x 6144, 16-bit depth, ~75 MB per image) and would like some advice on a few issues:
Photos are attached for reference: < CPU Bottleneck: Some plugin threads reach up to 99.9% CPU usage, limiting the capture rate > < Polling Impact: Polling causes overall CPU usage to decrease and lowers image capture performance >
Best regards, Kuktae |