Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

OMF with PI Web API

Message optimization

  • Last UpdatedSep 04, 2025
  • 2 minute read

How you group and construct OMF messages can greatly impact the performance of the OMF endpoint. This section includes sample messages that illustrate the following ways to improve performance.

Increase Messages Sent per Request

The most effective way to improve performance is to increase the number of messages sent per request, which allows messages to be batched together and processed simultaneously. Each request incurs the cost of scheduling, processing headers, deserializing the request body, and other work. If requests are combined, this work can be shared between messages, greatly improving performance.

Increase Values Sent per Message

The second method to improve performance is to increase the number of data values sent per message. Processing a data message requires retrieving the type and container. If the request contains separate data messages, the PI Web API needs to retrieve the type or container multiple times; if the data values are all sent in the same message, the type or container only needs to be retrieved once.

Create More Properties per Container

Another method to improve performance is to create fewer containers containing more properties, instead of more containers containing fewer properties. The data cache performs lookups per container, so PI points grouped together in the same container will be found faster than PI points spread out between multiple containers.

The first time data is sent to a container, it will take longer than subsequent data messages. This is because the container has not yet been cached. Once the PI points used by an application have all been cached (also known as "hydrating the cache"), application performance will improve. If you experience timeout issues when an application first starts, you may need to set the client timeout to longer than the default value.

Separate Static and Dynamic Data Messages

When an application wants to send both static and dynamic data, it is best to send them in separate requests. When a request contains static data, the PI Web API will process it in exclusive mode, causing messages to be processed one at a time. When the request contains only dynamic data, the PI Web API will process it in concurrent mode, which allows multiple messages to be processed at the same time. Exclusive mode severely decreases performance, but is necessary to ensure static data is created correctly. Therefore, if you need to send static data messages, make sure to send them in a separate request - either before or after any dynamic data messages.

TitleResults for “How to create a CRG?”Also Available in