Why Are My TDMS Files So Large? Primary Software: LabVIEW Development Systems>>Professional Development SystemPrimary Software Version: 8.5 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: When I run my program for an extended period of time the size of my TDMS files and the TDMS index file are in the gigabyte range. What can I do to get those file sizes down? Solution: Any time data is written to a TDMS file a header is written along with the data to the TDMS index file. This means if you write 1 point at a time to the TDMS file then there is header information for every data point in your file. To minimize this affect you can write multiple data points at once to the TDMS file, or you can use one of the built in TDMS functions. The TDMS Defragment.vi will go through the current TDMS file and consolidate all data dealing with a particular channel. It does take some time to run a large TDMS file through the TDMS Defragment.vi, but it will speed up performance for subsequent TDMS reads. ![]() ![]() Another option is to use a buffer to store a certain amount of data before being written to the TDMS file. If you are only writing one point of data per TDMS Write in your code then you can specify a minimum buffer size that must be achieved before anything will get written to the TDMS file. This will decrease the number of headers being written, which will also speed up performance. To accomplish this set the NI_MinimumBufferSize to a desired value for every channel being written to the TDMS file. ![]() Related Links: Developer Zone Tutorial: TDMS File Format Internal Structure Developer Zone Tutorial: Introduction to LabVIEW TDM Streaming VIs Attachments:
Report Date: 05/12/2008 Last Updated: 05/13/2008 Document ID: 4LBG3ANE |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||



