08-06-2007 09:18 AM
I’ve been generating a lot of data lately which I am saving in the TDMS format and then analyzing with DIAdem.
My question is about the file size…why are they so large?
For example, I generated a .tdms file that had about 83K rows x 45 columns of data. This weighed in at a staggering 247 Meg for the .tdms file and 217 MEG for the index file! The same amount of data in a flat file format weighs in at about 29 MEG…and order of magnitude less. Is there something I’m doing wrong?
I was under the impression that the .tdms file format had a fairly small footprint. At this rate, for a 4000 hour test (our target run time) the files will be approximately 80 Gigabytes combined. Something doesn’t seem right here…
Just to give you the background...I am running a test where I am appending data to a TDMS file once a second. I am writing the same data each time (i.e. same columns). I can furnish the .vi I am using to generate the data if it will help.
I read somewhere that .tdms files are written in segments and that each segment contains index and header information. Could part of the problem be that each time that I write new data to the file (every second) it is treating this as a new segment and storing all of the header info with it (even though it would be identical to the previous point)? I read that "The index file is an exact copy of the *.tdms file, except in that it does not contain any raw data and every segment starts with a TDSh tag instead of a TDSm tag" (
http://zone.ni.com/devzone/cda/tut/p/id/5696). If I subtract the file size of the index file from the tdms file, it comes in at around 30 Megs of raw data, which corresponds with the flat files I was comparing it to earlier. Is there a way to minimize this other meta, index, and header data within the file?08-06-2007 09:26 AM
08-06-2007 09:37 AM
08-06-2007 09:44 AM
08-06-2007 10:26 AM
Excellent. Thanks for the help!
I just ran a 2 minute (120 rows) sample with the buffer set at 1000 and compared it to a run with no buffer. My TDMS file size went from 358K to 52K and the index file went from 315K to 9K. It seems that the larger the buffer I set the smaller the file will ultimately be, correct? You stated that in the case of TDMS File Close being called or the VI being aborted that the remaining data in the buffer is written to the file. Im assuming that in the event of a power loss, all the data in the buffer is lost. Therefore, would you recommend setting the buffer size to the ammount of data that I can tolerate losing in the event of some unforseen event (power loss, etc.)?
08-06-2007 10:33 AM
08-09-2007 03:04 PM
08-09-2007 04:24 PM
08-17-2007 10:52 AM
08-17-2007 11:06 AM