LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tdms memory usage increases

Hello,

I am using a tdms file to store and read back data for displaying on a graph.  There are seperate programs running, one for acquiring data and program control being displayed on one PC monitor, and the other displaying data on 6 selectable panes with waveform graphs on a seperate PC monitor. 

Here is my general program operation.

I open the tdms file and use a global variable to hold the refnum.  I then write to and read from the file from multiple locations continuously while the system is running.

While doing this there is a steady increase in memory usage which doesn't go away when the file is closed, deleted, then recreated which was an attempt to clear the memory.  I am roughly losing 250MB of memory every hour the system is running. 

Also I have a tdms file used for data logging which is opened and closed during every write cycle and I do not see the memory growth as seen when keeping the file open.

To test where the memory leak was coming from because my overall program is very large, I diagram disabled all of the tdms writes on the open file and no longer saw the memory usage increase.

Things I have tried are:
- Flushing tdms memory after writing or reading
- Closing file periodically, deleting it, then recreating it
- Tested only writing to file, disabled reading
despite these efforts the memory continues to increase.

This is a major problem because the client this software was created for needs to run tests for at least 24 hours at a time and currently that is not possible because the system eats up all the memory and labview crashes within something like 6 hours.

I am using labview 8.2, after seing that 8.2.1 hads some major updates to tdms functionality, I advised our client to upgrade but no change has been seen in the performance

Thanks in advance
Ryan
0 Kudos
Message 1 of 2
(2,819 Views)

Hi Ryantroz,

1) Be sure that you are not opening and closing the file within a loop.

2) Be sure that you are closing all references that you open.

3) Please use the Profile Memory and Performance tool to identify which VI is causing the problem.  Go to Tools >> Profile >> Memory and Performance.  Select Profile memory usage and Memory usage to view which VI is causing the memory leak. 

Let us know how it goes.

0 Kudos
Message 2 of 2
(2,800 Views)