latency comparison for Linux and RTLinux kernels
Im testing a simple echo server, which uses epoll interface to catch events (packets receive from client).
My goal is to compare the round trip times for a simple echo server.
server: echo the received packed, runs with RT_FIFO, priority:99, cpu affinity is set to a particular CPU where no other tasks interferes.
following are the results (see the attached figure).
kernel | epoll_wait timeout | packet RTT(us)
------------------------------------------------------
RTlinux | 0 | 290
RTlinux | 1 | 338
linux (non-RT) | 0 | 290
linux (non-RT) | 1 | 340
when epoll_wait timeout=0 ( constant polling), round trip time 290(us), for both RT & Non RT kernels.
however, when epoll_wait timeout=1ms, the round trip time increases to 340us (even for RT kernel this is 338us)
RT-kernel reduces the latency, but the avarage time is still higher than the polling mode for both kernels.
Why does this happen ?, my goal is to improve the time for epoll_wait timeout=1ms.
|