Stream to Disk Benchmarks for cRIO Controllers

Overview

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.

Contents

Results Summary

  1. Write Block Size
    • Streaming performance depends on the size of the data block you are attempting to write.  A rule of thumb is that you should write block sizes at least 1 MByte in size to achieve the best streaming rates (see graphs below). Streaming performance can decrease sharply when writing smaller block sizes.
  2. Channel Configuration
    • Streaming performance can degrade when streaming large numbers of channels to disk.  This means that writing a 1MB block of data divided up into 16 channels takes longer to write than a 1MB block divided up into 4 channels.
  3. File Format
    • Streaming to a binary file is about 20 - 30% faster than streaming to a TDMS file using the LabVIEW 8.6 TDMS VIs.
    • Streaming to a TDMS file using LabVIEW 8.6 TDMS VIs is about 20% faster than streaming to a TDMS file using the downloadable GTDMS VIs.
  4. Disk Space
    • To achieve the best streaming rates, you must not fill up more than 80% of your local hard drive.  Streaming performance can decrease sharply when the local drive's free space drops below 20%.
  5. Peak Streaming Performance Corresponding to File Format
ControllerLV 8.6 BinaryLV 8.6 TDMSLV 8.6 and GTDMS
cRIO-90742 MB/s1.8 MB/s1.5 MB/s
cRIO-90144 MB/s3.3 MB/s2.8 MB/s
cRIO-90226.3 MB/s4.6 MB/s3.7 MB/s

 

Write Block Size

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.

Channel Configuration

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

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.)

Streaming Performance of Different cRIO Controllers

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:

ControllerLV 8.6 BinaryLV 8.6 TDMSLV 8.6 and GTDMS
cRIO-90144 MB/s3.3 MB/s2.8 MB/s

 

Figure 5: cRIO-9074 Streaming 1D Wfm Data to Different File Formats

cRIO-9074 Peak Streaming Rates:

ControllerLV 8.6 BinaryLV 8.6 TDMSLV 8.6 and GTDMS
cRIO-90742 MB/s1.8 MB/s1.5 MB/s

 

Figure 6: cRIO-9022 Streaming 1D Wfm Data to Different File Formats

cRIO-9022 Peak Streaming Rates:

ControllerLV 8.6 BinaryLV 8.6 TDMSLV 8.6 and GTDMS
cRIO-90226.3 MB/s4.6 MB/s3.7 MB/s

 

Related Links

Benchmarks Involving Both cRIO Streaming and Data Acquisition:

Developer Zone:  Reference Applications for cRIO Waveform Acquisition

Download LabVIEW API for GTDMS Streaming:

Developer Zone:  VI-Based API for Writing TDMS Files

Was this information helpful?

Yes

No