Network Variable Performance
- Updated2023-02-21
- 2 minute(s) read
Network Variable Performance
The Network Variable Library uses worker threads to invoke the callbacks. Network variable performance deteriorates if your application runs tight loops because the library worker threads do not get enough time on the processor. To avoid this, pause the processor in your long-duration loops by calling Sleep or other appropriate functions. This is especially important if you are reading or writing to network variables in polling loops.
When the reader and writer applications are running on different computers, the Network Variable Library provides better network throughput if the network variable is hosted on the computer running the writer application.
LogosXT
The underlying technology of the NI-PSP protocol is Logos, a National Instruments proprietary protocol for interprocess communication. Network variables in LabWindows/CVI 8.5, LabVIEW 8.5, and Measurement Studio 8.1.x and later use a more efficient TCP-based implementation of Logos called LogosXT to transfer network variable data. National Instruments recommends that you use LogosXT, which the Network Variable Library uses by default.
Network variable performance decreases when computers hosting the reader, writer, and network variables are mixed between Logos and LogosXT. Performance is especially degraded when the writer and network variable host use LogosXT and the reader that attempts to read the network variable uses Logos. This issue occurs for all reader connections. For optimum performance, National Instruments recommends that all computers accessing network variables, including the computer that hosts the variable, use LogosXT. If using LogosXT on all computers is not possible, you can improve the throughput rate by configuring the network variable to use server-side buffering with a sufficiently large server-side buffer.
There may be instances when you want to disable LogosXT and use the previous protocol implementation on all computers accessing network variables. You can disable LogosXT in the following ways:
- Windows—In the registry, add a DWORD value named DisablePSPXT to the HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\LogosXT registry key. Set the value of DisablePSPXT to 1.
- RT systems—Add the following line to the ni-rt.ini file:
[logos]
PSP.DisableLogosXT=1