Optimizing the Subsystem for Deployment
By default, the Runtime is provided for usability and is not necessarily optimized for performance. The tables below list recommended RTSS Subsystem configuration settings for deploying RTX64 Runtime with your product. You can configure these settings using the RTX64 Control Panel or programmatically using the native or managed code framework to improve subsystem and application performance.
For deployment systems running Windows 10 or Windows 11, we recommend their respective Long Term Servicing Channel (LTSC) versions. See the Web page RTX64 Support for Windows 10 Updates for an outline of supported Windows 10 Updates. See the Web page RTX64 Support for Windows 11 Updates for an outline of supported Windows 11 updates.
Subsystem Configuration Options
Change internal system behavior
Control Panel Setting | Recommended Value for Deployment |
---|---|
Change the HAL Timer Period |
Your application's Timer Period must always be more than the HAL Timer Period setting. The default HAL setting is 100. NOTE: Use caution when setting the HAL timer period below 20 microseconds. If the HAL timer period is set too low, it can inversely impact performance or cause your system to hang. Fully test the timer period you set with your real-time application on all systems on which you will deploy to verify that the hardware can accomplish the compilations required in the period set. |
Free the Stack on TerminateThread calls |
Free the stack on TerminateThread calls |
Use priority inversion |
Use priority inversion (default) |
Optimize performance with Intel® Resource Director Technology (RDT) NOTE: This functionality is hardware dependent. |
Optimize performance (enabled)
|
Change memory allocation behavior
See Managing Memory in the RTX64 Control Panel for more information on these settings.
Control Panel Setting | Recommended Value for Deployment |
---|---|
Manage Subsystem and application memory behavior:
|
Use local memory (deterministic) |
Zero memory on allocation |
Disabled |
Process memory allocation space / Minimum size for external MSpace (kilobytes) |
Based on local memory usage of your application. Before deployment, you can query the local memory usage by calling RtQueryProcessMSpace. |
Process memory allocation space / Auto expand MSpaces |
Disabled |
Process memory allocation space / Auto shrink MSpaces |
Disabled |
System process memory allocation space / Minimum size for internal MSpace (kilobytes) |
Based on local memory usage of your application. Before deployment, you can query the local memory usage by calling RtQueryProcessMSpace. |
System process memory allocation space / Minimum size for external MSpace (kilobytes) |
Based on local memory usage of your application. Before deployment, you can query the local memory usage by calling RtQueryProcessMSpace. |
System process memory allocation space / Commit at Subsystem startup |
Disabled |
System process memory allocation space / Auto expand MSpaces |
Disabled IMPORTANT! When Auto expand MSpaces is disabled for the Subsystem you will be responsible for configuring the amount of memory the Subsystem has for internal and external resources for the entire system. This includes Networking components (NAL and RT-TCP/IP Stack) and other tools and utilities provided with the RTX64 Runtime. If the Subsystem does not have enough available memory, real-time processes will fail to run or fail to create IPC objects with ERROR_NOT_ENOUGH_MEMORY. See the MiniTutorial Best Practices for Disabling Auto Expand MSpaces in the Help for recommendations on how to proceed with Auto expand MSpaces disabled. |
System process memory allocation space / Auto shrink MSpaces |
Disabled |
Network memory allocation space / Network Abstraction Layer (NAL) memory allocation space / Minimum size for MSpace (kilobytes) |
Based on local memory usage of the NAL, which is dependent on the number of enabled interfaces. |
Network memory allocation space / Network Abstraction Layer (NAL) memory allocation space / Commit at Subsystem startup |
Disabled |
Network memory allocation space / Network Abstraction Layer (NAL) memory allocation space / Auto expand MSpaces |
Disabled |
TCP/IP Stack memory allocation space / Network Abstraction Layer (NAL) memory allocation space / Minimum size for MSpace (kilobytes) |
The minimum size of the TCP/IP Stack process's external MSpace. This value needs to be large enough to support RT-TCP/IP Stack heap allocation. If you are using the TCP/IP Stack with the Virtual Network, you should use the following formula to determine the amount of memory you need to allocate: Minimum=1.5*((〖50〗_k+(8_k*(numEnabledInterfaces-1)))+(〖150〗_k*((numEnabledInterfaces+1)/2))+(400*numSockets)) In this calculation: • The first interface is 50k; each additional interface is 8k • 150k is the size of a connection; the number of (interfaces+1)/2 is intended to round out the estimate of the total connection size • 400 is the size of a socket • The entire value is multiplied by 1.5, again to round out the estimate |
TCP/IP Stack memory allocation space / Network Abstraction Layer (NAL) memory allocation space / MSpace memory allocated to the TCP/IP Stack heap (kilobytes, not including memory allocated by device drivers at startup) |
3072 kilobytes NOTE: The TCP/IP Stack must allocate all necessary memory on start up to be deterministic. This allocated memory value should be large enough to include all transmit and receive buffers. |
TCP/IP Stack memory allocation space / Network Abstraction Layer (NAL) memory allocation space / Auto expand MSpaces |
Disabled |
Change Monitoring Settings
Control Panel Setting | Recommended Value for Deployment |
---|---|
Enable instrumentation within the subsystem for monitoring real-time applications |
Disabled for lowest latencies |
Configure watchdog timer settings
Control Panel Setting | Recommended Value for Deployment |
---|---|
Monitor for runaway threads
|
Disabled for performance purposes |
Configure exception support
Control Panel Setting | Recommended Value for Deployment |
---|---|
Choose a method for treating a faulting process |
Terminate Faulting Processes (default) |
Choose a method for each exception type |
Structured Exception Handling (default) |
Control power management settings
Control Panel Setting | Recommended Value for Deployment |
---|---|
Enable Windows idle detection |
Not selected NOTE: To eliminate jitter with RTSS timer response latency, we recommend that you disable Windows idle detection. As a result, you may see 100% CPU usage in the Windows Task Manager when the Subsystem is running. There is no side effect on Windows load balancing for this type of 100% CPU usage. |
Windows Energy/Performance Bias |
Override Windows |
NOTE: For optimal performance when running RTX64 on a laptop, we recommend that you convert Display adapters to Microsoft Basic Display Adapter in the Windows Device Manager. If you choose not to convert display adapters, you may experience latency.
Configure remote debugging
Control Panel Setting | Recommended Value for Deployment |
---|---|
Allow remote debugging connections on this computer |
Not selected (default) |
Configure real-time application output
Control Panel Setting | Recommended Value for Deployment |
---|---|
Display real-time process output in console windows |
Selected (default) |
Display a separate console window for each real-time process |
Selected (default) |
Set the buffer size (lines) |
1000 (default) |
Log real-time process output |
Not selected (default) |