Another realtime delay question - Mesa card

More
01 Jan 2024 15:40 - 01 Jan 2024 15:43 #289479 by chienMouille
Hello, happy new year.

I have yet another question about realtime delay.
I have read quite a bunch but I don't seem to put two and two together.

So, I get the error message:
Unexpected realtime delay on task 0 with period 1500000 

It seems really high doesn't it? 
It's the servo thread, in my understanding.

here are my questions:
1- I'm running of a Mesa 7i95, so does this message even matter? I thought the mesa would do all the timing.
2- If it does, what to do? I have disable everything in Bios (or like all that seemed to be what was recommended on this forum). 
3 -I have already set the base period of the servo thread much higher than default, as you see in the error message. I can't see any difference in the resulting parts machined. What kind of problem should appear? I'm running a milling machine with AC servos in position mode, with a stepscale of 3000 (and 400 for dirsetup, dirhold, steplen and stepspace). I also get feedback form 1um linear scales.

I don't understand the consequences of this problem, nor what to do at this point, except setting the servo thread even slower.

Thanks in advance!
Last edit: 01 Jan 2024 15:43 by chienMouille. Reason: formatting

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

More
01 Jan 2024 15:50 #289481 by PCW
The Mesa card does all the timing _between_ servo thread invocations but does
depend are reliable communications every servo thread.

What host hardware are you running?

What are your ping times:

ping -c 4 -i .2 [ip_add]
sudo chrt 99 ping -i .001 -q [ip_add]

Let the last command run for about a minute and type control C to stop
The statistics after the last command is stopped are what are important'

[ip-add] is the mesa card IP address, probably 192.168.1.121 or 10.10.10.10

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

More
01 Jan 2024 16:16 #289482 by chienMouille
Host hardware is a shuttle XPC nano PC NC1010XA, which I bought new.
It has:
Processor:
Intel Celeron 4205U, Dual Core, 15 W TDP
Intel ULV “Whiskey-Lake-U” Generation
Integrated Intel UHD graphics 610, DX12
RAM:
4GB DDR4 SO-DIMM memory module
SSD:
128 GB M.2-2280 SATA SSD card


Results from the ping tests:
0.391ms
0.152ms
0.151ms
0.150ms

and

89386 packets transmitted, 89386 received, 0% packet loss, time 89386ms, rtt min/avg/max/mdev = 0.064/0.121/0.200/0.007ms

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

More
01 Jan 2024 16:25 #289483 by PCW
Ping looks OK, looks like that PC has an intel MAC, have you tried
disabling irq coalescing? (man hm2_eth)

 

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

More
01 Jan 2024 16:40 - 01 Jan 2024 16:47 #289484 by chienMouille
ok, just to be sure, now the interfaces file looks like this:

# The loopback network interface
auto lo
iface lo inet loopback

shall I just add the following and reboot?:

auto eth1
iface eth1 inet static
   address 10.10.10.10
   hardware-irq-coalesce-rx-usecs 0
Last edit: 01 Jan 2024 16:47 by chienMouille.

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

More
01 Jan 2024 17:07 #289485 by chienMouille
So, I changed the interfaces file as I wrote above (not sure it's correct). I now get very similar results when running latency test. (max jitter of 218654 and 91808)

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

More
01 Jan 2024 18:08 #289488 by tommylight

auto eth1
iface eth1 inet static
   address 10.10.10.10
   hardware-irq-coalesce-rx-usecs 0

Address wrong, anything BUT 10 at the end, from 1 to 254, pick anything, just not 10.

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

More
01 Jan 2024 19:49 - 01 Jan 2024 20:14 #289504 by chienMouille
Ok, I did that.
I get now (after reboot) 126211 and 86039 jitter on latency test.
Still not great no?

EDIT: I still don't understand how much it matters (like now the servo jitter would be in the range of the timing I set in the ini, which is much higher than the default). Is that OK? When does it become critical? How much the timing of the PC plays in relation to the one of the Mesa card?
Last edit: 01 Jan 2024 20:14 by chienMouille.

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

More
01 Jan 2024 20:29 #289510 by PCW
The timing servo thread  does not matter much, as long as
jitter plus communication delays do not cause loss of
communications from timeouts or real time delays.

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

More
02 Jan 2024 07:19 #289540 by rodw
Looks like this pc only has 2 cores. typing 
echo $(nproc)
will confirm

in the bios, check that cstates is set to the minimum (cstates=1)
Assuming you are using the 2.9.2 ISO on the downloads page, set isolcpus=1
sudo grub-customizer
on the second tab where it says quiet, change it to quiet isolcpus=1
if you can't find cstates in you bios, make it
quiet processor.max_cstate=1 isolcpus=1
Save and reboot

See if latency has improved
 

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

Time to create page: 0.202 seconds
Powered by Kunena Forum