10-11-2017 10:19 AM
Is there a way to monitor if an app uses page swapping?
Can it be disabled such that the app only uses RAM?
Thanks,
Kevin
Solved! Go to Solution.
10-11-2017 10:43 AM
NI Linux RT is configured by default to not have swap. Further, any data that is loaded from disk into memory in a LV application (e.g. a library, a dataset, etc.) will not be evicted (even if it is read-only or has not been modified) as LabVIEW on the target is configured to mlockall(), which prevents mapped memory from being swapped (or evicted), which can happen even without a proper swap setup (in the case of RO areas of memory).
If you care to check or otherwise have tighter visibility into what your application is doing, you should look into some of the available pseudofiles in the /proc filesystem (see: http://man7.org/linux/man-pages/man5/proc.5.html). Some files of interest for your concerns are /proc/$PID/pagemap (note: this is a set of bitfields, you will need to use something like hexdump to view) and /proc/$PID/smaps. If you are running a LV application, you would use the PID of lvrt (either through ps or, more directly, pidof lvrt). There's a lot of really handy, interesting information in the /proc pseudo filesystem, give that document a read-through.