AnsweredAssumed Answered

PI AF Client high CPU on client with a long running AF TableLookup query

Question asked by p2cl2 on Jun 14, 2017
Latest reply on Jun 14, 2017 by gregor

We have our server app on a machine (tested on 2 cores, no hyper-threading, WS2012R2 VM on VmWare) along with PI AF Client, connecting to a pair of PI servers, PIPoint and AF

Most of our accesses are for PIPoints (non-AF, not via the AF server)

 

A few accesses are AF, all for TableLookup DataReferences to linked to external database servers

 

We have one particular call for Recorded values over an 18 month period... there won't be too many datapoints, maybe 1 a day per attribute

 

Because of other (external) reasons, it seems as if the query takes a long time (8 seconds) on the external server... that is (I believe) being looked at

 

But... during the query the *client* side takes 50% CPU and if we run 2 queries at the same time, it's roughly 100% CPU

 

I have created a simplified test app that just queries using the minimum AF SDK calls to check it's not my code and it does seem to be during the call into the PI AF Client

 

This is just for a single attribute so the method is...

        rv.Data = attribute.Data.RecordedValues( timeRange, AFBoundaryType.Inside, null, null, false, maxCount );

 

It's as if something is busy-waiting in a tight loop in PI AF Client, but that would be very odd. My code is executing on a "ThreadPool.QueueUserWorkItem"

I tried ... RecordedValuesAsync ... but that's not supported (so the exception says)

I believe we are now at the very latest PI AF Client version (recently updated from another not too old version)

 

Any thoughts on how I should start to look at this would be most welcome

 

TIA

Steve


Outcomes