MRG Realtime Features
The implementation of a MRG Realtime does not consist of a single feature. Rather, it is a long progression of features whose ultimate goal is to ensure that realtime priority application threads run at highest priority and are minimally interrupted for the handling of lower priority processes and system services. For a much more in-depth description of the realtime implementation, refer to this technical whitepaper. The following are a few examples of key technical realtime enhancements found in MRG Realtime:
- Low latency interrupt handling - the lengthy, and non-interruptable, codepaths inherent in device interrupt handlers are a primary source of system non-determinism. MRG Realtime addresses this by breaking up these long-running kernel codepaths into separately schedulable portions. This ensures that lower priority event handling does not block priority realtime processing.
- Enhanced priority handling - MRG Realtime includes more fine-grained tuning control. For example it is possible to schedule network processing at higher priority than disk and storage processing. Additionally, there are scheduler enhancements to further guarantee that higher priority processes get uninterrupted service.
- Priority inversion avoidance - MRG Realtime, when used with the glibc runtime library, provides priority inheritance. This is a mechanism to ensure that lower priority processes do not block higher priority processes which are contending for shared resources. A scalable priority inheritance algorithm is a requirement for realtime java.
- Timer precision - all realtime applications inherently require highly accurate timing events. This makes it possible to have accurately timestamped messages, and event timeouts that occur precisely as scheduled. Conventional Linux has had its timing accuracy governed by a periodic system interrupt, which results in imprecise timing. In contrast, MRG Realtime uses hardware based event timers, resulting in substantially more accurate and predictable timing.
- Latency tracer - the latency tracer is a peak detector. It identifies the longest running, non-preemptable kernel codepaths, which is invaluable when differentiating whether non-deterministic response times are occuring in kernel vs application space.
- Tuna - Tuna is a tool for system tuning. A system running MRG Realtime must be properly tuned to provide the best deterministic performance. Tuna provides a graphical interface for tuning your system on-the-fly as you put it under load, making the process of finding an optimal set of tuning configurations much faster and easier.