I am doing various experiments with the Ubuntu kernel with the launch of the 3.5.7 kernel. I warm up my control code to 10 million iterations, and then move on to 90 million iterations. However, I see the following jitter:
Average: 242 nanos | Min Time: 230 nanos | Max Time: 4717 nanos 0.75 = avg: 240, max: 246 0.9 = avg: 241, max: 247 0.99 = avg: 242, max: 250 0.999 = avg: 242, max: 251 0.9999 = avg: 242, max: 517 0.99999 = avg: 242, max: **2109** <=== 0.999999 = avg: 242, max: **3724** <=== 0.9999999 = avg: 242, max: **4424** <===
I see bad times at 0.01% of my iterations. Is it possible to make the Linux kernel really real-time? Is there anything else in the kernel that I cannot control?
for(int i = 0; i < iterations; i++) { long start = get_nano_ts(&ts); for(int j = 0; j < load; j++) { long p = (i % 8) * (i % 16); if (i % 2 == 0) { x += p; } else { x -= p; } } long end = get_nano_ts(&ts); int res = end - start;
c ++ performance optimization benchmarking real-time
Latencyguy
source share