Skip to main content

OPC Data Transfer via BatchRead Every 30 Seconds

info

In this data transfer test, we established a connection between 640,000 OPC data points and an OPC Router instance and transferred them to MQTT and InfluxDB every 30 seconds. The average data transfer rate was 21,209 data points per second.

Systems

OS: Windows Server 2019 Standard 1809
RAM: 16GB
Processor: 64-bit 2.6GHz (4 cores)
OPC Router: 5.3.5007.156

OS: Windows Server 2019 Standard 1809
RAM: 12GB
Processor: 64-bit 2.6GHz (4 cores)
KEPServerEx: V6.16.203.0

OS: Windows 10 Pro N 22H2
RAM: 12GB
Processor: 64-bit 2.6GHz (4 cores)
KEPServerEx: V6.16.203.0

Projects

Two KEPServerEx Projects

  • each with one channel (simulator)
  • each with one device (16-bit device)
  • each with 20 tag groups
  • each with 100 sub-tag groups
  • each with 200 tags

OPC Router Projects

For the two test cases, two projects with the same structure but different numbers of flows—and thus different numbers of data points—were created. Description of the simple project:

  • Four OPC UA client connections (2 plug-ins per KEPServerEx)
  • Each plug-in is used in 400 template instances, each for a single “Batch Read” transfer object
  • Each “Batch Read” transfer object queries 200 tags every 30 seconds and writes them to MQTT and InfluxDB

Summary: In Test Case 1, 320,000 tags were read every 30 seconds and transmitted to MQTT and Influx.

Test Case 2: In this case, 800 template instances are run per plugin instead of 400. This is intended to query 640,000 tags every 30 seconds.

 Structure of the template instances (flows)

OPC UA Client Connection

Deviations from the default:

  • Quickstart – Timeout (ms): 240000
  • Security – Validate server application URI: true
  • Subscription – Register OPC tags on startup: true
  • Advanced – Timeout (ms): 240000
  • Advanced – Enable maximum number of data points per query: true
  • Advanced – Maximum number of data points per query: 2500
  • Advanced – Soft limit on max items per subscription: 1500
  • Advanced – OPC Read Mode: Asynchronous

Evaluation

Test Case 1

A total of 320,000 data points were read every 30 seconds, distributed across four plug-ins, and written to MQTT and InfluxDB. After 30 minutes of runtime, the amount of data written to InfluxDB was checked.

 At a rate of 640,000 data records per minute, 100% of the data was transferred in our test

Test Case 2

640,000 data points were read every 30 seconds and written to MQTT and InfluxDB, distributed across four plug-ins. After 30 minutes of runtime, we checked how much data had been written to InfluxDB.

 At 1,280,000 data records per minute, more than 99% of the data was transferred in our test

Conclusion

The two test cases differ only in the amount of data, and the limit of this setup lies precisely between them:

  • Test Case 1 – 320,000 data points every 30 seconds, or about 10,700 data points per second: fully transferred.
  • **Test Case 2 – 640,000 data points every 30 seconds, nominally about 21,300 data points per second: more than 99% transferred. The small loss results in the 21,209 data points per second actually transferred, as mentioned at the beginning.

Thus, when the load doubles, not every value is transmitted. If completeness is required, plan for a single instance on this hardware with a load below 640,000 data points every 30 seconds, or distribute the connections across multiple instances (horizontal scaling).

Project Files

Test Case 1

Test Case 2

KEPServer Ex – Benchmark Batch Read Server 1 (ZIP, 9 MB)

KEPServer Ex – Benchmark Batch Read Server 2 (ZIP, 9 MB)

:::note[[ [Extract before importing]] The KEPServer project files are provided as a ZIP archive. Extract the archive before importing the included .opf file into KEPServer Ex. :::