03-25-2025 10:45 AM
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?
Solved! Go to Solution.
03-25-2025 06:10 PM
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.
04-01-2025 07:31 AM
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!