About unexpected realtime delay ...

More
7 years 2 weeks ago #147931 by jonch919

l2-max wrote: Hi Guys,

After tweaking LinuxCNC on my ASROCK-J3455-ITX board, I got really good latency not exceeding 5000nS. However, the minimum BASE_PERIOD I can set without getting unexpected realtime dalay is 39500nS. That gives me confident 25.3kHz pulse rate. If I go less than 39500nS then as close I approach ~32000nS as sooner after starting LinuxCNC I get the error. I also noticed, that I needed to increase BASE_PERIOD after I added second parallel port. With one parallel port BASE_PERIOD was set to 37500nS and no error was seen.

My question is "Is that CPU speed limits BASE_PERIOD in my case?"

CPU J3455 1.5GHz.

Maksym


I have the same motherboard as you and I'm trying to solve some latency issues.
Would you mind posting your bios settings ans what tweaks you have made to achieve such low latency numbers?
I'm at about 30-50us normally, with spikes up to over 100-120us on latest Debian 9 and RT kernel..
Have you been successful in disabling SMI, with Smictrl or some other method? It doesn't work at all for me.

Please Log in or Create an account to join the conversation.

More
7 years 2 weeks ago #147939 by l2-max
I do not think my tweaks will help you much as you and I running different Debian releases.

Initially, latency test on this mother board shown 16uS with official RTAI 2.7.14 ISO image. Then I switched to 2.8 master branch. Latency remain exactly the same as with official release despite kernel changed to preempt-rt. If you cannot reach such latency with clean 2.7.14 RTAI on the motherboard then I am not sure my BIOS setup will help you much.

Sorry, I do not have LinuxCNC machine by hand thus, what I recall, I disabled "INTEL speed step" (-3uS) to run processor at constant speed and may be, not sure disabled virtualization (not sure it had some impact on latency). I also isolated CPU on 2 cores only (that tweak helped a lot -8uS) and latency dropped down to 5uS.

That is it, from what I remember had noticeable impact on latency. Try booting from 2.7.14 RTAI flash drive and run latency test to see if it will be different from what you have now.
The following user(s) said Thank You: jonch919

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #148349 by DomCa
Hi!

Maaybe check this:
forum.linuxcnc.org/9-installing-linuxcnc...or-new-rtai-packages

Gave me great latency values!

Further reading for 2.7 rtai:
forum.linuxcnc.org/18-computer/25927-red...lticore-pc-s-success
In combination With setting max cstates
Gave me latencies below 10.000ns

On the 2.8 with 5.2rtai (first link) other tips made it worse. Will investigate further...

One thing is for sure: rtai will give you much better results!


Regards
Domca
I

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #148351 by pl7i92
if you are on softwarestepping 35000 is well good to go
what kind of interface and drivers are you using

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago - 7 years 1 week ago #148363 by l2-max

pl7i92 wrote: if you are on softwarestepping 35000 is well good to go
...

However, this motherboard can do 5000nS, so, why not to squeeze that:)
Last edit: 7 years 1 week ago by l2-max.

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago - 7 years 1 week ago #148375 by tommylight

l2-max wrote:

pl7i92 wrote: if you are on softwarestepping 35000 is well good to go
...

However, this motherboard can do 5000nS, so, why not to squeeze that:)

Oh well, if you are using almost any BOB, those short pulses will disappear somewhere on their way to the drives, and most cheap drives do not even work with anything under 10.000uS.
It is very nice for directly reading encoders! :)
Last edit: 7 years 1 week ago by tommylight.

Please Log in or Create an account to join the conversation.

Time to create page: 0.318 seconds
Powered by Kunena Forum