From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Examples and IP for Software-Designed Instruments and NI FlexRIO

cancel
Showing results for 
Search instead for 
Did you mean: 

High-Speed Serial Streaming to Disk

Description

 

This example shows best practices for efficient streaming data to disk with the lowest overhead and highest data rates. This sample project is ready out-of-the-box for use with the NI PXIe-6591R but can be directly adapted to most high-performance RIO targets.

 

There are also some system steps you can follow to help ensure good streaming performance:
   1. Use matched (size and model) memory DIMMs on your host system- for NI's embedded controllers (e.g. 8130, 8133, 8135), ensure that you have a pair of identically sized memory modules or,      in the case of the PXIe-8880, use 3 matched DIMMs; a controller with only 1 DIMM has bad memory bandwidth jitter.
   2. Disable non-essentail Windows/background services and exit all programs other than your streaming application.
      2a. If possible, avoid using remote desktop to control your system as it may induce FIFO overflows and underflows, particularly when connecting and disconnecting.
   3. Be wary of BIOS Settings that can affect streaming/bus/CPU performance:
      3a. Disable power-saving/management features, such as CPU C-states and PCIe link power management, as these can lead to unexpected degredation of streaming performance.
      3b. If available to configure, use 256 byte (or higher) PCIe max payload sizes for best performance (this is the default setting on 8135 & 8880 controllers)
   4. For host VIs, do not update LabVIEW front panel control/indicators in the main Read/Write data production loop (i.e. the loop that's reading/writing the DMA buffer(s)); use a separate loop to          update front panel indicators.
   5. Use large DMA FIFO buffers (both FPGA and host side) to protect against buffer overflows resulting from any PCIe bus, memory/storage controller or operating system hiccups.
      5a. If possible, stream data through onboard DRAM as an alternative, or supplement, to large, FPGA-side DMA FIFOs.
      5b. 32-bit LabVIEW is usually OK for moderate streaming but 64-bit LabVIEW is recommended for high-bandwidth, multi-device data streaming (2 - 12 GB/s) where several, gigabyte (or greater)       DMA buffers are needed.
   6. The host DMA buffer size must be an even multiple of the read/write size you are using. The minimum multiple to start with is the physical page size (usually 4096 bytes).
      6a. For each DMA operation, use relatively large reads and writes, on the order of 8, 16 or 32 MB.
   7. It's highly recommended to use a high-performance RAID array (such as the NI HDD-8266) in a high-speed configuration, like RAID0, to allow for the necessary streaming data rates to and from       disk.
      7a. Size the RAID array's volume for the streaming rate you need
      7b. SSD or flash storage devices are recommended for use in your RAID system as mechanical drives are slower and degrade in streaming performance the closer the data being written is to           the inner rim.
      7c. Use a separate, dedicated drive/volume for data streaming, rather than a drive which also has other files on it which causes file fragmentation and speed degredation.
   8. Be aware that you should programmatically wait for TDMS Reserve File to complete for multi-terabyte files as this operation may take long to complete.
   9. Use the TDMS Advanced Asynchronous Read and Write (Data Refrence) VIs for best performance with RIO-based devices
      9a. In configuration, use at least 4 to 8 asynchronous reads or writes (test for your RAID array and application for configuration with best performance).
      9b. Use TDMS Advanced Asynchronous Read and Write (non-Data Reference) for APIs that accept or return LV arrays.
   10. If using a 3rd party controller/system, consider using an NI embedded controller instead as NI controllers have been optimized and validated by NI R&D for optimum streaming performance.

 

 

Hardware and Software Requirements

This example is pre-built for the NI PXIe-6591 and has the following minimum requirements to run:

HW:

SW:

* Note: The main operation of the this example does not depend on a certain FPGA module and thus can be adapted to most RIO targets for high-performance streaming applications