Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Prosys OPC UA java SDK Performance
January 3, 2013
2:21, EET
Avatar
hufsicer
New Member
Members
Forum Posts: 2
Member Since:
January 2, 2013
sp_UserOfflineSmall Offline

Hi, I have been developing a UA server for CIM Server(IEC 61970/968) based on OPC UA JAVA SDK 1.01.
while I was developing the UA server, I found performance problems in data loading.

==========================================================
○ Server Environment

1. Language : JAVA 1.6
2. SDK : Prosys SDK Ver 1.4.2 (OPC JAVA SDK : Opc.Ua.Stack-1.01.330.0)
3. Runtime Envirionment : CPU 2.93GHz(4 Cores), Memory 8GB, Windows 7
4. Data : Object Node 1,000,000 (Property Node 7,000,000)
5. Performance : 170,000 Nodes loading : 30 Minitutes (Too late)

over 180,000 ,,,, not estimated
==========================================================

○ My Code – Load Object Data (addNode)
===============================================================
newNodeId = new NodeId(ns, nodeId);
newObjectNode = new UaObjectNode(nodeManager, newNodeId, nodeName, Locale.ENGLISH);
newTypeId = new NodeId(ns, nodeType);
newType = new UaObjectTypeNode(nodeManager, newTypeId, nodeType, Locale.ENGLISH);
newObjectNode.setTypeDefinition(newType);
newNode.addReference((UaNode)newObjectNode, Identifiers.HasComponent, false);
===============================================================

○ I assume, “UaServerReference.java” code has problems.
===============================================================
UaReference[] sourceRefs = sourceNode.getReferences(referenceTypeId,
false);
if (sourceRefs != null)
for (UaReference r : sourceRefs)
if (r.getTargetId().equals(targetNode.getNodeId()))
return (UaServerReference) r;
===============================================================
– Cause
1. Too many ExpandedNodeId garbage data were increasing in memory.

My questions is:

1. Could you please tell me if SDK upgrade plan for this?
2. How to load the data in this case?
3. Any kind of solution or experience to develop the BIG DATA circumstance.

January 3, 2013
12:05, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 960
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Yes, the UaNode-based design easily leads to problems with memory usage, if you have a huge number of nodes in the address space.

Therefore, it is recommended to try to map the underlying data with a custom node manager that does not need to instantiate the nodes. See the MyBigNodeManager example in the Tutorial and SampleConsoleServer project for details on how to implement your server like that.

March 29, 2014
18:51, EET
Avatar
hbrackel
Member
Members
Forum Posts: 124
Member Since:
February 21, 2014
sp_UserOfflineSmall Offline

Hello,

I’m wondering whether the performance issue with a high number of nodes is still up-to-date in the current version of the SDK.
I need to create a server for testing with 250 000 AnalogItems. I do create them (configurable through parameters) in 25 groups (FoldersType instances) with 10 000 Analog items each. Creating the first 10 000 takes about 4 seconds. From there every additional folder instance with 10 000 analogItems take approx. 2 seconds more (so 4 secs, 6secs, … 48+ secs). It looks like the SDK is doing something to/with the nodes which is linear with the number of nodes. Running the node creation in different threads per folder doesn’t help any.
The data is *not* backed by any process data, which is why I don’t use a custom nodeManager so far.

-HU

March 31, 2014
6:18, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 960
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

There are some changes in the SDK 2.0 beta..Have you tried with that one? Anyway, there may also be still possibilities for optimisation for this kind of scenario.

Also, the Java memory usage may affect this, so I would recommend starting the Java process with more initial memory.

April 3, 2014
10:29, EEST
Avatar
hbrackel
Member
Members
Forum Posts: 124
Member Since:
February 21, 2014
sp_UserOfflineSmall Offline

I’m still on Version 1.4.4 of the Toolkit. I went through the effort of creating a custom NodeManager (like the sample MyBigIoManager). Speed is just amazing! While it would still be nice to have comparable performance using the standard UaNodeManager, the custom node manager answers all performance needs.

PS: the JVM runs with more than 4GB of RAM (out of 32GB on the machine)

April 3, 2014
14:18, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 960
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Yes, with that amount of data it is easily a better option and you have full control over it.

April 7, 2014
14:00, EEST
Avatar
Arildn
Member
Members
Forum Posts: 11
Member Since:
October 4, 2013
sp_UserOfflineSmall Offline

Hello,

I have another question about the performance of the Java SDK. In our case, we instantiate multiple UaClient for each jvm process, and for each UaClient we create a handful of subscriptions. How would multiple UaClient instances affect performance? Let’s say we instantiate 10 UaClient, each with 2 subscriptions. How many native threads creations would that result in?

April 7, 2014
16:13, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 960
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Each client will create two threads: one for Java IO socket listener (blocking) and another one for managing the subscription notifications and status checking.

April 8, 2014
6:40, EEST
Avatar
Arildn
Member
Members
Forum Posts: 11
Member Since:
October 4, 2013
sp_UserOfflineSmall Offline

Thanks for the reply. Does it mean that there is only one thread managing all subscriptions related to one UaClient, regardless of the number of subscriptions?

April 8, 2014
7:31, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 960
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Yes

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 267

Currently Online:
16 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 124

pramanj: 86

ibrahim: 74

rocket science: 65

kapsl: 57

Sabari: 51

gjevremovic: 49

Xavier: 43

fred: 41

TimK: 41

Member Stats:

Guest Posters: 0

Members: 1749

Moderators: 15

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1323

Posts: 5649

Newest Members:

WalterFOUNC, datafastproxiespx01, LenkaLok, seoninet, justinevillanuev, namtrott5457, DonaldWibip, AlfredoEthix, andreidla, everangel7021

Moderators: Jouni Aro: 960, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 860, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 25, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 222, Lusetti: 0

Administrators: admin: 1