Rhys Kirk

Multi-threaded performance overhead within AFSDK

Discussion created by Rhys Kirk Champion on Oct 3, 2014
Latest reply on Oct 10, 2014 by skwan

We are experiencing an issue with the AF SDK 2.5 & 2.6.


It appears that as soon as > 1 thread is attempting a data access request that there is an overhead to manage the concurrent requests; it appears to be consistent despite the number of threads.


For example, I want to call PlotValues for 5 Attributes using AFAttribute.Data.PlotValues. I can call those on a single thread in sequence and in general is performs extremely fast - for arguments sake 10ms. If I take an alternative approach and spread out the PlotValues across multiple threads the response time per data request increases across all threads - in this case it can jump up to 150ms. There is no delay on the PI Server (I can see via the piarchss threads there is no block, and multiple threads are serving the requests), the block appears to be coming from the AF SDK.


I can interchange between 1 thread, and 2/10/20 threads, and 1 thread is always much faster to return from the PlotValues call. 


I have a TechSupport ticket open, so you can contact me via that or post the cause on here. TechSupport suggested I post the issue here too.