Re: Why is real time pinging not possible with RT kernels?

Corey Minyard
2017-06-13T16:53:22Z

On 06/13/2017 11:06 AM, Chris Friesen wrote:
> On 06/13/2017 05:58 AM, Sebastian Andrzej Siewior wrote:
>> On 2017-06-12 07:57:18 [-0500], Corey Minyard wrote:
>>> A few notes on what you have done:
>>>
>>> * ionice doesn't affect network I/O.
>>> * renice does not set real-time priorities.
>>> * You don't do anything with memory locking. What happens
>>> if memory in your program gets paged out then is required?
>>> * Something on the other end of the ping is running, too. It
>>> also needs to be real-time, too, and it's not by default.
>>
>> You forgot to mention that the real-time kernel is not automatically
>> overclocking the software in terms of performance (but providing
>> determinism).
>
> Pinging localhost *should* be reasonably quick. It's basically a test
> of the scheduler and context switching (once all the memory is locked
> in place).
>
> Chris

That's not what Sebastian is talking about. Some people believe that
running a task on an RT kernel will make it run faster. RT is not about
making your program run faster. It's about, if you have a properly
designed application, having your program meet certain latency
requirements. RT generally reduces throughput.

Pinging localhost should, of course, be reasonably quick, but we
are talking about latency guarantees. Generally being reasonably
quick is not the same thing as guaranteeing latency every single
time.

To the original poster's credit, they were talking about latency, not
throughput, so I didn't address the performance question. They
seemed to be asking the right question, they just didn't know how
it all works on Linux.

-corey