Subscription service CPU cost at UA server side

Questions regarding the use of the C++ SDK for Server or Client development or integration into customer products ...

Moderator: uasdkcpp

Post Reply
dy_100000
Full Member
Full Member
Posts: 9
Joined: 11 May 2012, 09:53

Subscription service CPU cost at UA server side

Post by dy_100000 »

Hello, support team:

Currently, I’m implementing a value synchronization mechanism between the distributed UA servers, and I plan to use the subscription service provided by the SDK.

As the concrete implementation of subscription service from UA server side is not defined by OPC UA specification, it is hard to evaluate its performance. In this case, please let me to ask 2 questions:

- There are 2 kind of strategy to detect the data change in UA Server. The first one is to register monitored item’s data change event once the data value writing operation complete. The second one is that the system compares periodically all of the monitored items’ current value with its old one. Which kind of strategy does the SDK choose?
- What is the degree of increment of CPU charge when the monitored item number and session number become bigger, linearly, exponentially or almost constantly?

PS: The context of the above questions is based on REPORTING subscription mode, and the data value change inside the server is regular.

Thanks a lot.

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re:Subscription service CPU cost at UA server side

Post by Support Team »

1)
The datasource i.e. your IOManager implementation can call IOVariableCallback::datachange to inform the SDK that a value has changed. The SDK will then check if the value has changed. If the value has changed the new value will be put into the queue for that item and the subscription is informed about the change. So there's no periodically comparing of values.

2)
That depends a lot on the scenario. If there are huge numbers of items and the values change very rarely there's almost no load on the server since the subscription has nothing to send and there's no periodical checking for value changes.
If almost all items change their value all the time there's almost no difference if they are all in one subscription or if they are distributed over multiple subscriptions.
So there's not really an easy answer for that. Generally the charge will rise with the number of items that actually changed. One of the reasons for that is the time needed to serialize all the data to the network protocol.

Best Regards,
Unified Automation support team
Best regards
Unified Automation Support Team

dy_100000
Full Member
Full Member
Posts: 9
Joined: 11 May 2012, 09:53

Re:Subscription service CPU cost at UA server side

Post by dy_100000 »

Thanks a lot, that is exactly the mechanism I expected.

Post Reply