LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unwanted advanced TDMS "memory growth" in Linux RT target only

Solved!
Go to solution

Good morning, everyone,

 

I need to write a large amount of data at various sample times, so I opted for the TDMS file format. I'm aware of the "memory growth" issue, so I implemented the advanced APIs using only synchronous writes. While testing on a Windows host, memory usage remains stable as expected. However, when running the code on the RT target, memory usage keeps increasing until the RAM is full.

I have already tried using "TDMS Flush" after each write, but the issue persists.

 

Does anyone have any suggestions?

 

0 Kudos
Message 1 of 3
(441 Views)

Have you written any test code to isolate the RAM use to be sure that it's the TDMS code and not some other difference between the two systems? 

 

Meaning, code that just calls the "TDMS Generate Random data" function in a loop and writes that, or something similar that eliminates as much as possible that isn't TDMS code, i.e. no subVIs that aren't part of the TDMS library already.

0 Kudos
Message 2 of 3
(388 Views)
Solution
Accepted by topic author Fabbro03

I tried to isolate the TDMS loop, but the issue was still present. I also tried using binary writes, but the issue persisted. Then, I remembered that in Linux, "free" memory and "available" memory are different.

To investigate further, I ran the code while connected via SSH and monitored the memory usage with the free command. I noticed that only the "cached" memory was increasing. After a quick Google search, I confirmed my suspicion: the System Property Node displays the "free" memory in Linux, not the "available" memory (NI Knowledge Article).

So, in the end, it wasn’t actually an issue.

Thanks!

Message 3 of 3
(361 Views)