AnsweredAssumed Answered

AFSDK Bulk summary calls slower that other bulk calls

Question asked by I.Berry on Mar 17, 2015
Latest reply on Mar 18, 2015 by bshang

Hi,

 

I have noticed with some simple tests that the Bulk call performance of the Summary calls is much slower than the other calls (PlotValue, Recorded Values). I would like to use Bulk calls because I have 100+ms of latency to the PI server (although the below test results do not).

 

This is the paging config:

PageType                    : TagCount

BulkPayloadPercentThreshold : 10

OperationTimeoutOverride    : 00:01:40

KeepAliveTimeout            : 00:01:40

PageSize                    : 100

 

 

And these are the test results:

#Number of Points in point list:  218

 

$listResults = $pointlist.Snapshot()

#Total Seconds : 0.0272895

#Values From Call : 218

 

$listResults = $pointlist.PlotValues($tr,1000,$pagingconfig)

Total Seconds : 1.2507364

#Values From Call : 796596

 

$listResults = $pointlist.RecordedValues($tr,[OSisoft.AF.Data.AFBoundaryType]::Inside,"",$true,$pagingconfig,100000)

Total Seconds : 4.1796506

Values From Call : 3135593

 

$listResults = $pointlist.Summary($tr,[OSIsoft.AF.Data.AFSummaryTypes]::Average, [OSIsoft.AF.Data.AFCalculationBasis]::TimeWeighted, [OSIsoft.AF.Data.AFTimestampCalculation]::Auto,$pagingconfig)

Total Seconds : 22.1929201

Values From Call : 218

 

 

Is this expected behavior? It looks like there is a bottleneck on the PI server side for Bulk summary calls? Compare this to a non bulk call, just iterating through the PointList with syncronous calls, the bulk call is an order of magnitude slower (results below), perhaps I am doing something stupid?

 

foreach($point in $pointlist)

{

$result = $point.Summary($tr,[OSIsoft.AF.Data.AFSummaryTypes]::Average, [OSIsoft.AF.Data.AFCalculationBasis]::TimeWeighted, [OSIsoft.AF.Data.AFTimestampCalculation]::Auto)

}

Total Seconds:  0.7235234

Values From Archive:  218


Thanks for any ideas or feedback!

Outcomes