Latency with Preempt - RT

Hi There…

I am trying to build linuxcnc on a Beagle Bone Black.

One of my challenges is the latency is far greater than what is suggested:

I run latency-test and get a
200microsecond maximum jitter for the 1ms thread, and
150microsecond max jitter on the 25microsecond thread.

The interval for the 25microsecond thread is 6.8microsecond. Two things confuse me. First, I am surprised to see such a low thread period. Secondly, what I see is much less than the programmed thread period.

Are there any experts on PREEMPT-RT that can provide some clarity on this. For instance, is there a way to improve on the jitter in PREEMPT-RT?

debian@BeagleBone:~/linuxcnc-dev/src$ cat /etc/os-release
PRETTY_NAME=“Debian GNU/Linux 11 (bullseye)”
NAME=“Debian GNU/Linux”
VERSION=“11 (bullseye)”
SUPPORT_URL=“Debian -- User Support

Thanks very much,

Make sure the kernel is configured properly.

Build a yocto image core-image-minimal, only add to it exactly what you need for the application.

Do a


and see what is not essential to your application and delete as much as you can. Use caution deleting you can break the system and not be able to recover it. Its best to start with a bare bootable system and add to it.
Also, use C not python so you can utilize threads instead of multiple processes.