Discuss and solve problems in energy management and automation. Join conversations and share insights on products and solutions. Co-innovate and collaborate with a global network of peers.Register Now
>>Message imported from previous forum - Category:ClearSCADA Software<<
User: rlao, originally posted: 2019-05-03 01:31:20 Id:423
Hi, what would be effective approaches of investigating high RAM usage by DBServer and seeing what components of ClearSCADA are the major hoggers? I have tried looking at 'Memory Usage' on Server Status, but that seems to be giving me the completely wrong values (e.g. for my server it is saying total usage is 3GB when actual RAM usage is several times that).
Reply User: adamwoodland, posted: 2019-05-06 22:45:20
Check the help for that screen, it is basically saying what memory has been required by the components listed, what actually Windows uses is up to Windows and the way it manages virtual memory.
SysInternal's (from Microsoft) RAMMap is a tool you can use, although diagnosing actual memory usage in Windows is tough given how abstract it is and for security purposes. If you do full memory dumps (not really an option on production systems as it freezes the process when running) more detailed analysis can be done.
You can do some finger in the air maths on expected RAM usage, i.e.
On fresh start up of ClearSCADA when it goes main or standby, see what the virtual memory usage is. Add say 20% for general stuff like flush data and client connections. Add the maximum value of all the historic caches. That should give you a theoretical number.
A much better way is to monitor the virtual memory usage over time to define what is 'normal' along with say the number of points/RTUs.
The way Windows manages memory is hyper complex, just because its going up doesn't necessary mean there is a leak or a problem, just Windows doing its thing.
Reply User: adamwoodland, posted: 2019-05-06 22:50:51
Also, for what its worth, I think that screen shouldn't exist due to confusion like this, but I guess it helps the development team when they look at issues.
Reply User: sbeadle, posted: 2019-05-07 06:43:49
Thanks Adam. Good answers. The 'memory used by database objects' figure in snapshots is an indication of database size, but not of how the objects use memory in total.
Reply User: rlao, posted: 2019-05-08 06:49:02
Thanks, reason I was asking is that one of our two permanent standby servers seems to be using double the memory than the others - 36GB compared to 18GB. In terms of database size, the more memory-hungry one is only slightly bigger and their history settings are identical.
The only other thing I can think of is that more users jump on that server throughout the day, however I do not see the memory usage go down outside of business hours when there should be barely any online users.
Reply User: sbeadle, posted: 2019-05-08 07:12:56
Good question. Windows rarely lets go of process memory unless there is competition for it. That said, it's always worth looking at memory usage regularly to see if something is amiss. It may be useful to compare snapshot files for both servers side-by-side to look for differences.
Reply User: GregYYC, posted: 2019-05-09 13:34:17
Earlier versions of the FloBoss/ROC driver has a memory leak causing high memory usage, especially if your polling timing was off and you had lots of requests sitting in the queue.
Reply User: du5tin, posted: 2019-05-09 20:05:05
I assume you want to optimize to solve some performance problem or free up RAM in your VM environment?
Tech support isn't gonna like this but in a VM environment constraining the RAM can actually make windows a bit more aggressive at cleaning up the memory over time. We have run fairly large point count systems initially in less than half the recommended RAM with minimal or no performance impact. Especially if you have fast disks!
If you need to free RAM up and you are seeing differences in usage across the two 'near identical' performance standbys try reducing the RAM available to the box. If the servers are physical then don't worry about it unless you are seeing performance issues.
Reply User: adamwoodland, posted: 2019-05-09 22:13:53
Reducing the available RAM will cause Windows to be more aggressive with trimming the standby memory (the Windows OS concept) which will impact server performance, so is not recommended. Windows is pretty good at its memory management, just let its do its thing and let Windows run as capable as it can.
The important bit is spotting any trend over time. Just having a Standby server using double the virtual memory than another doesn't concern me in the slightest from a server administration point of view (still interesting to know why, but that is curiosity rather than anything else), what would concern me would be if the process, DBServer.exe in this case, kept using more and more memory over time. That's why it is important to establish a baseline over a long time to see what is normal and what isn't before anyting can be stated as a problem.