Stream to Disk Benchmarks for cRIO Controllers

Publish Date: Sep 23, 2009 | 3 Ratings | 4.00 out of 5 |  PDF

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.

Table of Contents

  1. Results Summary
  2. Write Block Size
  3. Channel Configuration
  4. File Format
  5. Streaming Performance of Different cRIO Controllers
  6. Related Links

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

 

Back to Top

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

Back to Top

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

Back to Top

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

Back to Top

5. 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:

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

 

Back to Top

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

Back to Top

Bookmark & Share

Downloads

Ratings

Rate this document

Answered Your Question?
Yes No

Submit