Almost got it!! Events Cache provides the total number of events that are currently in the cache. Both periodic and natural analysis use the cache. The events processed represents the total number of events that have passed through the cache.
I knew this would start simple, and turn into a dive-deep into PI Analytics architecture... Some sequel to these questions:
- Is the evaluation count then the sum of backfilling (read: recalculation) and Events Processed?
- I would expect the Events cache to be nearly empty. I have 3 analysis running doing nearly nothing, but still i have between 14 and 16 Events in the Event cache. Any idea what this number means and how to interpret that?
Yeah, this is slowly turning into a deep dive for me as well
The evaluation count is not the sum of the back-filling and events processed. Evaluation count is how many evaluations the service has completed in real time (no backfilled). Note that not every event processed will trigger a Calculation. For example, we use pipes for all input data but do not trigger on every value so the events processed might not equal the evaluation count.
The cache is a little tricky to understand without diving too far in. Basically, by default we cache 5 minutes of snapshot data or a maximum of 1024 events. This helps us scale by reducing calls to the PI Server. To me, the Cache Hit Count and Cache Missed Count counters are useful to understand if we are even using the cache.
Events Cached / Events Processed are specifically data cache statistics. Events Cached is there to tell you something about the amount of data the service is currently holding in in-memory caches. It is the sum of EventsCached for all AFDataCache instances that we have. Events Processed tells you how many events have been processed by our internal data caches. It is simply the sum of EventsProcessed on all AFDataCache instances that we have.
1 Event Processed != 1 Evaluation. There are many reasons why this is true. If an input is a triggering input for 2 analyses there will be one event processed and 2 evaluations. If an input is not a triggering input for a calculation, it will still be cached (assuming it supports data pipe). If two events come in at the same time (or within the calculation wait time, technically) on two inputs that are triggers for a single analysis then the engine will only evaluate it once. If the event is out-of-order, it skipped by the engine. If the event is before the engine's startup time, it will be skipped. If the engine is behind it may apply skipping policy and skip the evaluation (this will cause an increment to EvaluationsSkipped). If an analysis is periodically scheduled, we still perform signups for inputs and cache the data, it is just that is not used to decide when to run the analysis.
The only counters related to recalculation are the number of requests processed and the number queued. There is nothing more granular like number of events processed or values written for recalculation.