Open nqduy35 opened 3 years ago
Have you tried selecting the minimal ns0 in the build config?
I have run through and applied every tip in the tutorial. In the tutorial, there is also these lines
The RAM requirements of a server are mostly due to the following settings:
- The size of the information model
- The number of connected clients
- The configured maximum message size that is preallocated
Follow the above remarks, I have already:
But RAM consumption is still high.
Already on this topic, maybe we should start thinking on a way of abstracting the node store (including references), in such a way that it can be moved to different backends (as done with the historic plugin).
The case being, in QUaServer I have been playing with alarms. In specific the ExclusiveLevelAlarm has a very heavy information model, just for one instance, because includes state machines, with lots of nodes and references. So I made tests with around 1000 alarms (which is not much for an industrial application) and the server eats up to 100 megs.
Now to be fair, every node in QUaServer is also a QObject, which adds to the problem, but when I profile the memory, actually the objects that consume most memory (around 40%) are OpcUa references (references within nodes) instantiated by open62541.
Ideally, by abstracting out the node store and references, one could move all that data to (for example) an SQLite database. True this would penalize speed of data access, but would reduce dramatically the use or RAM.
Tradeoffs...
Hello everyone,
I heard about the myth that "it is possible to configure minimal servers that require less than 100kB of RAM and ROM" published here. I did everything except to reduce the information model, and the RAM and ROM requirements are still high: running a server example requires 800KB of RAM. So I decided to reduce the information model NS0 by trying to remove unnecessary nodes. I want to find a "correct way" to do it. One way to do it I post in the issue #3978, but it does not work. Please give me some advice?
Many thanks for considering my request.
Checklist
Please provide the following information:
UA_LOGLEVEL
set as low as necessary) attached