LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to reduce page faults (virtual memory) usage in LabVIEW

I am running LabVIEW 2010 on Windows Embedded Standard system 4G (3G usable) of RAM.

 

The program (executable running on the Run-Time Engine) continuously samples from a USB-6251 at 1MS/sec (2 channels @ 500K) and scans the data stream for anomalous events, which are recorded to file.  The system is intended to run 24/7 for at least 2 months, and although everything is working fine (6% CPU, no memory leaks), it generates 6000 Page Faults / second.  I am concerned that I will kill the hard-drive at this rate, over long periods of time.  There is plenty of RAM available (LabVIEW is only using 200K, and there is over 2G free), but the program is choosing to rely on Virtual Memory instead.

 

Is there a way to force (coerce) a LabVIEW application to consume more RAM and less VM?

 

The code is heavy (2 independent routines to collect and process the data stream through a shared double buffer, lots of in-obvious logic...), but I will post if it would help to answer the question.

0 Kudos
Message 1 of 2
(3,438 Views)

@craig Akers wrote:

I am running LabVIEW 2010 on Windows Embedded Standard system 4G (3G usable) of RAM.

 

@The program (executable running on the Run-Time Engine) continuously samples from a USB-6251 at 1MS/sec (2 channels @ 500K) and scans the data stream for anomalous events, which are recorded to file.  The system is intended to run 24/7 for at least 2 months, and although everything is working fine (6% CPU, no memory leaks), it generates 6000 Page Faults / second.  I am concerned that I will kill the hard-drive at this rate, over long periods of time.  There is plenty of RAM available (LabVIEW is only using 200K, and there is over 2G free), but the program is choosing to rely on Virtual Memory instead.

 

Is there a way to force (coerce) a LabVIEW application to consume more RAM and less VM?

 

The code is heavy (2 independent routines to collect and process the data stream through a shared double buffer, lots of in-obvious logic...), but I will post if it would help to answer the question.


IIRC, the decision to move a page of memory from physical memory to disk is made at the OS level.  There probably isn't any setting you can change in LabVIEW to change this behavior.

 

Keep in mind that not every page fault results in a page being loaded from disk.  If your program (or the LabVIEW run-time) is frequently allocating and freeing memory, you could get a lot of soft page faults as the physical memory pages are repeatedly allocated to your process and returned to the OS.  If you're only running at 6% CPU, this wouldn't be a problem.

 

You could try disabling the page file altogether, if the machine has enough RAM, but I wouldn't do this unless you actually have a performance (or hard-disk durability) problem.  Having a page file to back up the physical memory is the difference between your program suffering from degraded performance vs. simply crashing if the machine runs out of physical memory.

 

Mark Moss

Electrical Validation Engineer

GHSP

0 Kudos
Message 2 of 2
(3,425 Views)