When streaming data to a cRIO controller's local drive, there are many questions and considerations. How many channels can I stream to disk? What file format should I use? Do I need a controller upgrade for my application? The following document explores the capabilites of the cRIO local drive under different operating conditions.
One thing to note is that these benchmarks are measuring the hard drive bottlenecks only. The following tests simply write the same block of data over and over. Since 100% of CPU resources are devoted to streaming we are just measuring how fast the hard drive can consume data. If you perform actual data acquisition or inline processing then the CPU's time will be divided between tasks and the data throughput will be less. For examples of cRIO data acquisition and streaming benchmarks see the related links section below.
Controller | LV 8.6 Binary | LV 8.6 TDMS | LV 8.6 and GTDMS |
cRIO-9074 | 2 MB/s | 1.8 MB/s | 1.5 MB/s |
cRIO-9014 | 4 MB/s | 3.3 MB/s | 2.8 MB/s |
cRIO-9022 | 6.3 MB/s | 4.6 MB/s | 3.7 MB/s |
Streaming performance depends on the size of the data block you are attempting to write. Figure 1 represents a series of tests where 1D Array of Waveform data is streamed to a TDMS file. Each point represents one streaming test where the same block of data is saved over and over for 5 seconds and an average streaming rate is calculated. The block size (or data array size) increases for each test so the streaming benchmark essentially sweeps the data block size and displays the average streaming performance for each block size.
Figure 1: Streaming 4 Channels of 1D Wfm Data to a TDMS File
We can draw several conclusions from Figure 1 but one of the most obvious is that the streaming performance improves as larger and larger block sizes are written. When using the 9014 you must save data blocks at least 1MB in size to get the best streaming rates. If this data had been acquired from 4 channels of an NI 9234 C Series module, that would correspond to about 60,000 samples per channel.
Even when block sizes are equal, it takes more time to save data if it is divided up into many channels. Figure 2 represents the same test as the graph above, but was conducted four times for four different channel configurations (4, 8, 16, and 32 channels respectively). As you can see, streaming performance degrades as you divide up the data block into more and more channels.
Figure 2: Streaming Different Channel Configurations to a TDMS File
For many applications though adding one or more channels can be beneficial to streaming performance. Applications involving data acquisition usually take data according to some number of "samples per channel". If you keep samples per channel constant but add a channel it increases the data block size, and the improvement in data throughput (see section above) generally outweighs the overhead incurred by the extra channel.
File format can have a great impact on the streaming performance of your cRIO application. Saving data in the binary file format will give you the fastest possible performance but binary files also provide the least in terms of data management and features. For example when reading from a TDMS file you have the option of reading certain channels by name and looking at only specific subsets. The extra information that enables this functionality also decreases your streaming performance in terms of data throughput.
Figure 3: Streaming 1D Wfm Data to Different File Formats
Figure 3 shows how streaming performance is affected by both block size and file format. The performance differences between GTDMS, TDMS, and Binary is similar across cRIO controllers and the datatype you are streaming with (1D Wfm, 2D DBL, etc.)
Figure 4 is the same as figure 3. They both show the cRIO-9014 streaming performance according to different block sizes and file formats. The subsequent figures show the same results for the cRIO-9074 and the cRIO-9022. The source code used to conduct these tests has been attached below.
Figure 4: cRIO-9014 Streaming 1D Wfm Data to Different File Formats
cRIO-9014 Peak Streaming Rates:
Controller | LV 8.6 Binary | LV 8.6 TDMS | LV 8.6 and GTDMS |
cRIO-9014 | 4 MB/s | 3.3 MB/s | 2.8 MB/s |
Figure 5: cRIO-9074 Streaming 1D Wfm Data to Different File Formats
cRIO-9074 Peak Streaming Rates:
Controller | LV 8.6 Binary | LV 8.6 TDMS | LV 8.6 and GTDMS |
cRIO-9074 | 2 MB/s | 1.8 MB/s | 1.5 MB/s |
Figure 6: cRIO-9022 Streaming 1D Wfm Data to Different File Formats
cRIO-9022 Peak Streaming Rates:
Controller | LV 8.6 Binary | LV 8.6 TDMS | LV 8.6 and GTDMS |
cRIO-9022 | 6.3 MB/s | 4.6 MB/s | 3.7 MB/s |
Benchmarks Involving Both cRIO Streaming and Data Acquisition:
Developer Zone: Reference Applications for cRIO Waveform Acquisition
Download LabVIEW API for GTDMS Streaming: