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:
- Highly deterministic performance: MRG Realtime dramatically increases the determinism of Red Hat Enterprise Linux. By providing a replacement kernel for Red Hat Enterprise Linux 5, MRG Realtime brings new scheduling and performance gains and provides full preemption so that it can respond to any event within 8 microseconds. For applications that cannot tolerate significant deviations in performance, MRG Realtime provides vastly enhanced determinism.
- High-resolution timers: MRG Realtime includes support for timers with nanosecond accuracy.
Optimized gettimeofday(): Many applications frequently call gettimeofday() operations for things like timestamping in log files. MRG Realtime includes an optimized gettimeofday() implementation that does not incur a context switch, resulting in significantly improved performance.
- Full application compatibility with standard Red Hat Enterprise Linux: MRG Realtime does not modify anything in the userspace of Red Hat Enterprise Linux. As such, it preserves full compatibility with applications certified for Red Hat Enterprise Linux-any application that runs on Red Hat Enterprise Linux will also run on Red Hat Enterprise Linux with a MRG Realtime kernel, without any modification or recompilation.
- 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.
Screenshot of Tuna tuning tool