0% found this document useful (0 votes)
14 views35 pages

2020 - OSISoft - Slide - Tips & Tricks For Managing Asset Analytics

The document provides an overview of Asset Analytics, a core component of the PI Server, highlighting its performance, ease of use, and functionalities. It outlines best practices for monitoring and troubleshooting issues, including the use of performance counters and programmatic access via AFSDK. The objective is to equip users with the knowledge to effectively manage and resolve issues related to Asset Analytics.

Uploaded by

Leo Zhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views35 pages

2020 - OSISoft - Slide - Tips & Tricks For Managing Asset Analytics

The document provides an overview of Asset Analytics, a core component of the PI Server, highlighting its performance, ease of use, and functionalities. It outlines best practices for monitoring and troubleshooting issues, including the use of performance counters and programmatic access via AFSDK. The objective is to equip users with the knowledge to effectively manage and resolve issues related to Asset Analytics.

Uploaded by

Leo Zhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Tips & Tricks for Managing Asset

Analytics
Sebastien Raposo, Sr Product Support Engineer AF &
Analytics

#PIWorld ©2020 OSIsoft, LLC 1


What is Asset Analytics?
• Core component of the PI Server
• Highly performant for streaming
calculations
• Easy to use
• Intuitive UI
• Intellisence
• Templatization (reusability)
• 150+ built in functions
• Backfill, manual recalculation and auto-
recalculation

#PIWorld ©2020 OSIsoft, LLC 2


Example use case
I want to detect possible
issues with my asset
• AF used to model assets
and processes (using
templates)
• Inputs come from asset
• Outputs used in
dashboards, reporting,
triggering notifications,
etc….

#PIWorld ©2020 OSIsoft, LLC 3


Typical symptoms of unhealthy Asset
Analytics

#PIWorld ©2020 OSIsoft, LLC 4


Objective

• After this talk, you should be able to manage


and solve most of your issues with Asset
Analytics
• Pareto Principle (80/20 Rule)
• Or, if you are a new user, you will be able to get
started on the right track

#PIWorld ©2020 OSIsoft, LLC 5


Agenda
• Monitoring
• Service level with Performance Counters
• Analysis level with AFSDK
• Diagnosing (identifying culprit analyses)
• Service Statistics
• PI System Explorer
• Log
• Best Practices
• Troubleshooting

#PIWorld ©2020 OSIsoft, LLC 6


Performance Counters
PI Vision
PI Interface for
Performance Monitoring

Production PI System(s) Monitoring PI System

#PIWorld ©2020 OSIsoft, LLC 7


Performance Counters - AFValues Written

• Good: Values are continuously increasing


• Bad: Values are stuck at 0 or flat lined

Good Bad

#PIWorld ©2020 OSIsoft, LLC 8


Performance Counters - Maximum Latency

• Good: Value is constantly around 5s OR lower


than tolerated latency (depends on use case)
• Ok: Value temporarily goes up and then comes
back down (step behavior)
• Bad: Value is consistently increasing

#PIWorld ©2020 OSIsoft, LLC 9


Maximum Latency

Good Bad

Depends… #PIWorld ©2020 OSIsoft, LLC 10


Performance Counters – Evaluation Skipped
Count
• Good: Value is constantly 0
• Ok: Value temporarily goes then flat lines
• Bad: Value is consistently increasing

#PIWorld ©2020 OSIsoft, LLC 11


Evaluation Skipped Count

Good Bad

It depends…
#PIWorld ©2020 OSIsoft, LLC 12
Other performance counters (Documentation)

• Analyses in Error / Running / Suspended


• Cache Hit Count / Miss Count
• Evaluation Count / Error Count / OOO Ignored
Count
• EF Written
• Events Cached / Processed
• Recalculation Requests Completed / Queued

#PIWorld ©2020 OSIsoft, LLC 13


Programmatic access to run time statistics
via AFSDK (2018 SP2)
• Retrieve statistics for particular analyses, such
as:
• Evaluation time
• Triggering Rate
• State (Error, Running, etc…)
• Skip Count

#PIWorld ©2020 OSIsoft, LLC 14


AFSDK access - Resources

• PI Square post on overview


• PI Square post on example PS1 script
• Presentation at PI World 2019

#PIWorld ©2020 OSIsoft, LLC 15


Service Statistics
• Documentation here to retrieve statistics
• Great PI Square post here on how to analyze
the statistics

#PIWorld ©2020 OSIsoft, LLC 16


Analysis Groups & stats
• Template=<TemplatePath>[Schedule:<Schedul
e>Rank:<Rank>]

TriggerRatio = AverageElapsed/AverageTrigger = ~2.5 -> Group will


lag perpetually
The lower the TriggerRatio the better. Should be below 0.15 ideally
#PIWorld ©2020 OSIsoft, LLC 17
More group statistics

#PIWorld ©2020 OSIsoft, LLC 18


Diagnosing - PI System Explorer

#PIWorld ©2020 OSIsoft, LLC 19


Performance Evaluation logger

• Documentation or YouTube video

#PIWorld ©2020 OSIsoft, LLC 20


How to automate detection of culprit
analyses?
• Programmatic access to runtime statistics
introduced in 2018 SP2…
• Example for latency:
$query = "status:'Running' averageLag>'60000’
sortBy:'averageLag' sortOrder:'Desc’”
$fields = "path lastEvaluationStatus
lastEvaluationStatusDetail lastLag averageLag
averageElapsed averageTrigger"
#PIWorld ©2020 OSIsoft, LLC 21
Automate monitoring with AF SDK
PI Vision

AF SDK Programmatic
Access

Production PI System(s) Monitoring PI System

#PIWorld ©2020 OSIsoft, LLC 22


Best Practices

• PI Analysis Service Best Practice article has to


be read before troubleshooting

#PIWorld ©2020 OSIsoft, LLC 23


Troubleshooting – Approach taken by
OSIsoft Product Specialist
• Assumptions:
• Culprit analyses have been identified
• Best Practice article has been read
• Look at analysis configuration (calculations and
scheduling)
• Look at analysis inputs

#PIWorld ©2020 OSIsoft, LLC 24


Analysis Configuration

• Are there any expensive functions


• Long summary function (Example TagAvg() over a
month…)
• Are there any repeating functions with same
inputs
• Does the scheduling make sense with what the
analysis is doing

#PIWorld ©2020 OSIsoft, LLC 25


Inputs

• Are any of the inputs in error?


• Handling with BadVal() is ok, but if the error can be
prevented that is better
• What’s the data density of the inputs?
• Events every second, minute, etc…
• What are the data references?
• Any expensive formulas or table lookups etc…

#PIWorld ©2020 OSIsoft, LLC 26


Example 1

• Scheduling is too
aggressive and/or
time range in
summary function is
too long

#PIWorld ©2020 OSIsoft, LLC 27


Example 2

• Slow analysis has a


simple configuration.
Issue is with a dense
input
• Solution: Reduce size
of table! Can be done
using parametrized
queries
#PIWorld ©2020 OSIsoft, LLC 28
Example 3

Use a variable to avoid running the same


calculation multiple times

#PIWorld ©2020 OSIsoft, LLC 29


System Best practices

• Use latest version


• Hardware sizing for SQL and Analysis
• We have a sizing guideline
• Dedicated node for Analysis for large scale
deployment
• Asset Analytics server should be “close” to
Data Archive and AF Server (and any external
system it connects to)
#PIWorld ©2020 OSIsoft, LLC 30
System Best Practices - Continued

• Use templates
• Use proper compression settings
• Minimize out of order data
• This is true for the PI System, not specific to Asset
Analytics

#PIWorld ©2020 OSIsoft, LLC 31


There is a limit to every system

• Asset Analytics can scale to a large number of


Analyses!
• The amount depends..
• If all analyses follow best practices and there
are still issues with the system OR any change
causes the system to tip to a bad state… might
be time to split the system.
• Reach out to Tech Support
#PIWorld ©2020 OSIsoft, LLC 32
• Sebastien Bergeron-Raposo
• Senior PSE AF & Analytics
• OSIsoft Canada LLC
[email protected]

#PIWorld ©2020 OSIsoft, LLC 33


Questions? Save the Date...

Please wait for


the microphone
DOWNLOAD
THE MOBILE
State your
APP
name & company

34
#PIWorld ©2020 OSIsoft, LLC 10

You might also like