Table of Contents
13 Performance Monitoring
Click Here for information about performance monitoring on windows.
Memory (RAM)
Because of the specific memory management of Linux it is not so obvious how much memory is in use and how much is free. A common pitfall is the use of the System Property Node FreePhysMem
to get the amount of memory LabVIEW (or other programs) could use. Linux uses extensive buffering of IO-operations that can lead to a huge memory usage. In this case FreePhysMem
will show a very low value (about 16 MB seems the minimum Linux holds back), but there is probably much more memory available if some process asks for it.
To get more detailed information about the memory on a Linux machine the best way it to read the (virtual) file /proc/meminfo
(e.g. with cat /proc/meminfo
on the Bash). A lot of the content is really complicated operating system stuff, for more information see https://access.redhat.com/solutions/406773.
Most relevant are the fist three lines:
-
MemTotal
: Total physical memory (same asTotalPhysMem
in the System Property Node) -
MemFree
: Memory not used by anything. Probably this is the valueFreePhysMem
in the System Property Node returns. This memory gets consumed from IO-buffers with the time. -
MemAvailable
: Is the amount of memory that a process or whatever can allocate until the memory is “full”. This is probably the best value to determine the free memory on a Linux machine.
Example output of /proc/meminfo
after the cRIO did a lot of IO-operations and the memory is consumed by the Buffer:
HSE Internal: For easy accessing the Linux memory info from LabVIEW there is a VI Get Linux MemInfo.vi
in the project HAGEMONITOR-MASTER. This VI returns all meminfo
content as attributes of a variant. In the future this VI could go into a RT-Tools-library.
LabVIEW's Memory Footprint
A tip courtesy of fellow LabVIEW friend Felipe Pinheiro Silva: You can read out the amount of memory that the LabVIEW real time application uses.
cat /proc/$(pidof lvrt)/status | grep VmRSS
Real Time Trace Viewer
Unlike the DETT, the Real Time Trace Viewer only shows timings. Tip: Have a second project which only contains the components of the code, which are also runnable under windows and use the DETT.
Getting started
-
place Start and Stop Trace methods in your code
-
make sure firewall rules allow communication
-
start Realt Time Trace Viewer
-
start the RT-Application