User Tools

Site Tools


kb:ni-rt:linuxrt:perf-mon

This is an old revision of the document!


13 Performance Monitoring

Resources

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.

Typical output of the file /proc/meminfo

Most relevant are the fist three lines:

  • MemTotal: Total physical memory (same as TotalPhysMem in the System Property Node)
  • MemFree: Memory not used by anything. Probably this is the value FreePhysMem 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: Typical output of the file /proc/meminfo

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.

kb/ni-rt/linuxrt/perf-mon.1651692170.txt.gz · Last modified: 2022/05/04 19:22 by joerg.hampel