File Buffering with TDMS Files
- Updated2025-08-15
- 2 minute(s) read
During TDMS file I/O operations, data that LabVIEW writes to a TDMS file resides in a buffer until the buffer fills up or until you close the file. Buffering can occur at the channel layer, in the operating system (OS) file system, or in the TDMS disk cache.
The following figure illustrates buffering with TDMS files for standard TDMS VIs.
The layer at which buffering occurs can depend on the property you set using the TDMS Set Properties function. For example, the NI_MinimumBufferSize property determines the number of data samples to buffer at the channel layer. The disable buffering? input of TDMS functions determines whether LabVIEW disables system buffering, which occurs in the OS. When the disable buffering? input is TRUE, LabVIEW disables system buffering and buffering occurs in the TDMS disk cache. The NI_DiskCacheSize property determines the amount of cache size in the TDMS disk cache to allocate for data. This property is valid only if the disable buffering? input is TRUE.
To write all buffers directly to the TDMS file, use the TDMS Flush function.
|
Note The NI_MinimumBufferSize property and the NI_DiskCacheSize property do not apply to the Advanced TDMS VIs and functions. |
When to Disable Buffering
You may want to disable buffering to speed up data transfers in the following situations:
- When you want to read or write a large sample size.
- When you want to read or write a large amount of data from different samples.
- When you use a Redundant Array of Independent Disks (RAID) to increase processing speed. A RAID is a set of hard disks acting as a single disk that the OS can simultaneously access, taking less time to read or write data. If you access a RAID with buffering enabled, LabVIEW can take more time to copy data to the OS than the OS takes to actually write the data to the disk.