Linux Foundation End User Summit 2008

Real-Time Linux Latency Comparisons

Test System

Kernels and Load

RHEL

SLES

Tests

The following selection of real-time tests from the LTP test suite were run on the kernels listed above.

gtod_infinite

/*
 * Simple program to measure the time between several pairs of calls to 
 * gettimeofday().  If the average delta is greater than just a few 
 * microseconds on an unloaded system, then something is probably wrong.
 */
SLES2.6.16.60-0.21-smp--IDLE2.6.16.60-0.21-smp--LOADED2.6.22.19-20080722_SLERT10_SP2_rt--IDLE2.6.22.19-20080722_SLERT10_SP2_rt--LOADED
Scatter Plots
Histograms
Data Filesout.log
samples.dat
samples.plt
out.log
samples.dat
samples.plt
out.log
samples.dat
samples.plt
out.log
out.log.bac
samples.dat
samples.plt

sched_latency

/*
 * Measure the latency involved with periodic scheduling.
 * Steps:
 * - A thread is created at a priority of 89.
 * - It periodically sleeps for a specified duration(PERIOD).
 * - The delay is measured as
 *
 *        delay = (now - start - i*PERIOD) converted to microseconds
 *
 * where, now = CLOCK_MONOTONIC gettime in ns, start = CLOCK_MONOTONIC gettime
 * at the start of the test, i = iteration number, PERIOD = the period chosen
 */
RHEL2.6.18-53.el5--IDLE2.6.18-53.el5--LOADED2.6.24.7-75.el5rt--IDLE2.6.24.7-75.el5rt--LOADED
Test Log
-------------------------------
Scheduling Latency
-------------------------------

Running 100000 iterations with a period of 5 ms
Periodic load duration: 1 ms
Expected running time: 500 s
jvmsim disabled


Start:  763 us: FAIL
Min:     21 us: PASS
Max:   2011 us: FAIL
Avg:   1017 us: FAIL
StdDev: 406.0719 us
Quantiles:
99.0% < 1867
99.9% < 1964
99.99% < 1995
99.999% < 2011
Failed Iterations: 99614

Criteria: latencies < 100 us
Result: FAIL
-------------------------------
Scheduling Latency
-------------------------------

Running 100000 iterations with a period of 5 ms
Periodic load duration: 1 ms
Expected running time: 500 s
jvmsim disabled


Start:  901 us: FAIL
Min:     27 us: PASS
Max:   3317 us: FAIL
Avg:   1016 us: FAIL
StdDev: 400.7819 us
Quantiles:
99.0% < 1871
99.9% < 1980
99.99% < 2173
99.999% < 3317
Failed Iterations: 99712

Criteria: latencies < 100 us
Result: FAIL
-------------------------------
Scheduling Latency
-------------------------------

Running 100000 iterations with a period of 5 ms
Periodic load duration: 1 ms
Expected running time: 500 s
jvmsim disabled


Start:    9 us: PASS
Min:      8 us: PASS
Max:     15 us: PASS
Avg:      8 us: PASS
StdDev: 0.5140 us
Quantiles:
99.0% < 9
99.9% < 10
99.99% < 10
99.999% < 15
Failed Iterations: 0

Criteria: latencies < 100 us
Result: PASS
-------------------------------
Scheduling Latency
-------------------------------

Running 100000 iterations with a period of 5 ms
Periodic load duration: 1 ms
Expected running time: 500 s
jvmsim disabled


Start:   18 us: PASS
Min:      8 us: PASS
Max:     41 us: PASS
Avg:     17 us: PASS
StdDev: 4.9236 us
Quantiles:
99.0% < 27
99.9% < 31
99.99% < 37
99.999% < 41
Failed Iterations: 0

Criteria: latencies < 100 us
Result: PASS
Scatter Plots
Histograms
Data Fileshist.dat
hist.plt
out.log
samples.dat
samples.plt
hist.dat
hist.plt
out.log
samples.dat
samples.plt
hist.dat
hist.plt
out.log
samples.dat
samples.plt
hist.dat
hist.plt
out.log
samples.dat
samples.plt

async_handler

/*
 * Measure the latency involved with asynchronous event handlers. Specifically
 * it measures the latency of the pthread_cond_signal call until the signalled
 * thread is scheduled.
 */
SLES2.6.16.60-0.21-smp--IDLE2.6.16.60-0.21-smp--LOADED2.6.22.19-20080722_SLERT10_SP2_rt--IDLE2.6.22.19-20080722_SLERT10_SP2_rt--LOADED
Test Log
-----------------------------------
Asynchronous Event Handling Latency
-----------------------------------

Failed to init mutex: 95 (Operation not supported)
jvmsim disabled
Running 1000000 iterations
Failed to init mutex: 95 (Operation not supported)
Failed to init mutex: 95 (Operation not supported)
recording statistics...
Min: 5 us
Max: 20 us
handler thread exiting
Avg: 5.7381 us
StdDev: 0.5929 us
signal thread exiting

Criteria: latencies < 100
Result: PASS
-----------------------------------
Asynchronous Event Handling Latency
-----------------------------------

Failed to init mutex: 95 (Operation not supported)
jvmsim disabled
Running 1000000 iterations
Failed to init mutex: 95 (Operation not supported)
Failed to init mutex: 95 (Operation not supported)
recording statistics...
Min: 4 us
Max: 8879 us
Avg: 12.6853 us
StdDev: 9.6024 us
handler thread exiting
signal thread exiting

Criteria: latencies < 100
Result: FAIL
-----------------------------------
Asynchronous Event Handling Latency
-----------------------------------

jvmsim disabled
Running 1000000 iterations
recording statistics...
Min: 3 us
Max: 46 us
handler thread exiting
Avg: 11.0715 us
StdDev: 2.6090 us
signal thread exiting

Criteria: latencies < 100
Result: PASS
-----------------------------------
Asynchronous Event Handling Latency
-----------------------------------

jvmsim disabled
Running 1000000 iterations
recording statistics...
Min: 3 us
Max: 55 us
handler thread exiting
Avg: 9.7418 us
StdDev: 3.0278 us
signal thread exiting

Criteria: latencies < 100
Result: PASS
Scatter Plots
Histograms
Data Fileshist.dat
hist.plt
out.log
samples.dat
samples.plt
hist.dat
hist.plt
out.log
samples.dat
samples.plt
hist.dat
hist.plt
out.log
samples.dat
samples.plt
hist.dat
hist.plt
out.log
samples.dat
samples.plt