To ensure your NI-Serial application meets your performance requirements, you should benchmark your application when developing a new application or migrating between NI Real Time Operating Systems (RTOSs). The NI-Serial driver supports both the NI Linux RT and NI Phar Lap ETS RTOS, and performance differences exist between the two operating systems.
NI R&D has profiled performance of the two operating systems, and there are several key performance takeaways to highlight:
This document presents the differences in performance between the two operating systems. For more information on performance metrics, see Make it Faster: More Throughput or Less Latency?
Note: NI will remove support for Phar Lap for PXI in the NI 2022 Software Release.
Benchmark tests were designed to represent common serial applications and compare NI-Serial driver performance between the two operating systems, Linux RT and Phar Lap. The table below shows an overview of tests conducted in this study.
The benchmark test is a C application that was ran on both operating systems. On Linux RT, the application used the taskset command to run the benchmarks to avoid CPU0 (CPU0 services a large number of operating system interrupts). Example command is below.
taskset -c 1,2,3,4,5,6,7 serialBenchmarkTest
The benchmark test used two 16 port PXIe cards for a total of 32 ports. Note: if your application requires higher serial port counts (greater than 16 ports), consider benchmarking your application while in developing to ensure it meets expectations.
Table 1: Benchmark test for NI-Serial on Linux RT and Phar Lap
Test | Hardware | Test Description | Metric |
---|---|---|---|
1 | PXIe-8880 Controller, (2) PXIe-8431/16 Boards, PXIe-1075 Chassis | For all Serial ports, test writes X byte message from Board1/Port1 to Board2/Port1 and then reads X byte message from Board2/Port1 to Board1/Port1 | Max Duration of Write and Read (Max Latency) vs. Baud Rate on Phar Lap and Linux RT |
Fig 1: Max latency (μs) for 10 byte message, (2) 16 ports boards, 4 baud rates. Note: Benchmark is using taskset command on Linux RT.
Fig 2: Max latency (μs) for 801 byte message, (2) 16 ports boards, 3 baud rates. Note: Phar Lap test case failed to complete at 921600 baud rate. Both Phar Lap and Linux RT test cases failed at 3M baud rate.
To optimize CPU affinity for NI-Serial performance in LabVIEW, see Assigning Processor Affinity in LabVIEW to Optimize Multicore Performance.
See Benchmarking NI Linux RT Application Performance for an overview of benchmarking the new application’s performance and ensure it meets expectations.
For more information on migrating your application, please see the Migrating Phar Lap Application to NI Linux RT article.