UA server SDK cost so much memory

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

Moderator: uasdkcpp

Post Reply
ston1309
Jr. Member
Jr. Member
Posts: 1
Joined: 17 Dec 2020, 02:22

UA server SDK cost so much memory

Post by ston1309 »

We implement a server based ‘C++ Based OPC UA Server SDK’. And the server cost so much memory to create node module. Here are the codes:

UaNodeSetXmlParserUaNode *pXmlParser = new UaNodeSetXmlParserUaNode(sNodesetXmlFile, pNodeManagerCreator, new UaBase::BaseNodeFactory(), NULL);
opcServer.addModule(pXmlParser);


We used loading xml to create modules. Here is the node xml sample in the attachment. There are about 56000 nodes. When the UA server started, it will cost about 330M size of memory.
Actually, we will register 20 times of that sample, about 1 million nodes. It will cost about 6G size of memory. It’s so large. How to resolve it ? Is there some way to reduce the memory cost? Thanks.
Is there some way about lazy load? Client can get the whole node tree and the SDK server havn't register the whole node object. Do you know how to do it?

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

Re: UA server SDK cost so much memory

Post by Support Team »

Hello ston1309,

there was an issue in the XML importer that caused some memory not to be freed. That issue has been fixed in Version 1.7.4 of the SDK.
Please use the latest version and retry.
Best regards
Unified Automation Support Team

Post Reply