Chapter 1. Why Use MRG Realtime to Optimize Latency?
For anyone considering evaluating the performance benefits of the MRG Realtime kernel, it is crucial to understand both the importance of tuning and how to establish the right performance expectations.
MRG Realtime is designed to be used on well-tuned systems for applications with extremely high determinism requirements. Kernel system tuning offers the vast majority of the improvement in determinism. For example, in many workloads thorough system tuning improves consistency of results by around 90%. This is why we typically recommend that customers first perform the suggested system tuning of standard Red Hat Enterprise Linux to see if it meets their objectives, before using MRG Realtime.
System tuning is just as important when using the MRG Realtime kernel as it is for standard Red Hat Enterprise Linux. In fact, if you simply took an untuned system running standard Red Hat Enterprise Linux and substitute the MRG Realtime kernel for the stock kernel supplied as part of the Red Hat Enterprise Linux release, you are unlikely to notice any benefit. Standard tuning will yield 90% of the determinism gains. The MRG Realtime kernel provides the last 10% of determinism required by the most demanding workloads.
Establishing the right performance expectations refers to the fact that the MRG Realtime kernel is not a panacea. Its objective is consistent, low-latency determinism offering predictable response times. There is some additional kernel overhead associated with the MRG Realtime kernel. This is due primarily to handling hardware interrupts in separately scheduled threads. The increased overhead in some workloads results in some degradation in overall throughput. The exact amount is very workload dependent, ranging from 0% to 30%. However, it is the cost of determinism.
For typical workloads with kernel latency requirements in the millisecond (ms) range, then the standard Red Hat Enterprise Linux 5.1 kernel is sufficient. If your workload has stringent low-latency determinism requirements for core kernel features such as interrupt handling and process scheduling in the microsecond (μs) range, then the MRG Realtime kernel is for you.
The red line in this graph represents the system response time (in μs) of a tuned Red Hat Enterprise Linux 5 kernel running a client/server messaging workload. The green line represents the system response time of a tuned MRG Realtime kernel. It is clear from this graph that the response time of the MRG Realtime kernel is very consistent, in contrast to the Red Hat Enterprise Linux 5 case which has greater variability and more spikes.