- Posts: 12160
- Thank you received: 0
Ethercat random jitter fix
6 months 3 weeks ago #345310
by rodw
Replied by rodw on topic Ethercat random jitter fix
I spoke too soon. I've been helping someone in Italy who has 6 Ethercat drives and says:
When run lcnc the drive pdo are read with after some second , respect debian 10 ( is instantanious). On dmesg have slave did not sync after 5000 ms. The same drive with the same xml file not have problem on debian 10. I have test 2 pc, with realtek nic and intel nic , but the problem is the same. How can resolve. This problem is the same on debian 12.
So I assume he' s experiencing this issue and using grandixximo's repo should fix it. Can someone confirm?
Its odd that he says it works on Debian 10. My live machine (since sold) was running Debian 11 so perhaps its a Debian 12 and up issue.
When run lcnc the drive pdo are read with after some second , respect debian 10 ( is instantanious). On dmesg have slave did not sync after 5000 ms. The same drive with the same xml file not have problem on debian 10. I have test 2 pc, with realtek nic and intel nic , but the problem is the same. How can resolve. This problem is the same on debian 12.
So I assume he' s experiencing this issue and using grandixximo's repo should fix it. Can someone confirm?
Its odd that he says it works on Debian 10. My live machine (since sold) was running Debian 11 so perhaps its a Debian 12 and up issue.
Please Log in to join the conversation.
- grandixximo
-
Topic Author
- Away
- Platinum Member
-
- Where are my paaaaants?
Less
More
- Posts: 353
- Thank you received: 2
6 months 3 weeks ago #345314
by grandixximo
---
test signature
Replied by grandixximo on topic Ethercat random jitter fix
I've used debian 10 11 and 13
I skipped debian 12 this is for internal timing release reasons, not because 12 had anything wrong with it. I did not notice on my hardware considerable differences between debian releases. If you have issues please share your configuration, be clear about the issue, share as much info as you can, and if you are not using my fork code, you most likely HAVE phasing issues. Those maybe effecting OP times, or motion, or nothing, it depends on the hardware. Will update to my fork fix everything? No, most definitely NOT everything, but I am sure phasing will be as proper as it can be on your system, and you will have debug pins to analyze performance which you can share, run halscope and halshow, see the ecat.0.xx pins, so that we can get to the bottom of the issue.
If Scott was still in the game, he would probably merge it and make a release. I would advise everyone to update, and if you have any issue, I will be here or on GitHub for support.
TL;DR
My fork does not magically fix all issues, but it does fix some, and gives you pins to benchmark your setup. Please build and install my fork, then test, and share your configuration and test results if you have issues and you want help.
I skipped debian 12 this is for internal timing release reasons, not because 12 had anything wrong with it. I did not notice on my hardware considerable differences between debian releases. If you have issues please share your configuration, be clear about the issue, share as much info as you can, and if you are not using my fork code, you most likely HAVE phasing issues. Those maybe effecting OP times, or motion, or nothing, it depends on the hardware. Will update to my fork fix everything? No, most definitely NOT everything, but I am sure phasing will be as proper as it can be on your system, and you will have debug pins to analyze performance which you can share, run halscope and halshow, see the ecat.0.xx pins, so that we can get to the bottom of the issue.
If Scott was still in the game, he would probably merge it and make a release. I would advise everyone to update, and if you have any issue, I will be here or on GitHub for support.
TL;DR
My fork does not magically fix all issues, but it does fix some, and gives you pins to benchmark your setup. Please build and install my fork, then test, and share your configuration and test results if you have issues and you want help.
---
test signature
Please Log in to join the conversation.
- grandixximo
-
Topic Author
- Away
- Platinum Member
-
- Where are my paaaaants?
Less
More
- Posts: 353
- Thank you received: 2
6 months 3 weeks ago #345315
by grandixximo
---
test signature
Replied by grandixximo on topic Ethercat random jitter fix
I'm also on the discord, and I am fluent in Italian
discord.gg/WwMfD9v9M
If your Italian friend wants to hop in, I'll be glad to help him out.
discord.gg/WwMfD9v9M
If your Italian friend wants to hop in, I'll be glad to help him out.
---
test signature
Please Log in to join the conversation.
6 months 3 weeks ago #345316
by Hakan
Replied by Hakan on topic Ethercat random jitter fix
This is not related to the phasing.
Or perhaps it is, on the way that clocks have started to run with different speeds.
You can switch on debug "ethercat debug 1" and watch the DC time difference between slaves slooowly converge.
It's part of the startup of slaves
gitlab.com/etherlab.org/ethercat/-/blame...e=heads&page=2#L1480
The server issues 5000 sync requests, one every millisec, and waits until clocks are within 10 microseconds.
If they aren't, you get the message. The slaves' clocks will eventually converge.
I had this issue, was unable to fix or even poke at it, and then suddenly it went away.
I suspect it has something to do with ethercat master version, but since I was unable to
diagnoze it, I really don't know.
Or perhaps it is, on the way that clocks have started to run with different speeds.
You can switch on debug "ethercat debug 1" and watch the DC time difference between slaves slooowly converge.
It's part of the startup of slaves
gitlab.com/etherlab.org/ethercat/-/blame...e=heads&page=2#L1480
The server issues 5000 sync requests, one every millisec, and waits until clocks are within 10 microseconds.
If they aren't, you get the message. The slaves' clocks will eventually converge.
I had this issue, was unable to fix or even poke at it, and then suddenly it went away.
I suspect it has something to do with ethercat master version, but since I was unable to
diagnoze it, I really don't know.
Please Log in to join the conversation.
6 months 3 weeks ago #345317
by rodw
Replied by rodw on topic Ethercat random jitter fix
Thanks I've passed that on. He'll probably call himself frk (Francesco)I'm also on the discord, and I am fluent in Italian
discord.gg/WwMfD9v9M
If your Italian friend wants to hop in, I'll be glad to help him out.
Please Log in to join the conversation.
6 months 3 weeks ago #345318
by rodw
Replied by rodw on topic Ethercat random jitter fix
I don't really see any difference between 12 & 13 (everything is 13 here). From earlier feedback on the preempt_rt email group, The preempt_rt network latency issues were most likely introduced in kernel 5.9 and Debian 11 had 5.10 but because Linuxcnc never released anything on 11, the issues did not appear until Debian 12 which I used from the original beta release.I've used debian 10 11 and 13
I skipped debian 12 this is for internal timing release reasons, not because 12 had anything wrong with it. I did not notice on my hardware considerable differences between debian releases.
Please Log in to join the conversation.
6 months 3 weeks ago #345353
by andrax
Replied by andrax on topic Ethercat random jitter fix
I found another clue.
A Google search for "Intel NIC interrupt moderation" yielded the following advice: this should be disabled, as it can also lead to jitter.
The Cause of Jitter: When enabled, the time between packet interrupts varies depending on traffic flow (sometimes fast, sometimes slow), causing inconsistent packet processing times.
That would at least be worth investigating.
A Google search for "Intel NIC interrupt moderation" yielded the following advice: this should be disabled, as it can also lead to jitter.
The Cause of Jitter: When enabled, the time between packet interrupts varies depending on traffic flow (sometimes fast, sometimes slow), causing inconsistent packet processing times.
That would at least be worth investigating.
Please Log in to join the conversation.
- grandixximo
-
Topic Author
- Away
- Platinum Member
-
- Where are my paaaaants?
Less
More
- Posts: 353
- Thank you received: 2
6 months 3 weeks ago #345355
by grandixximo
---
test signature
Replied by grandixximo on topic Ethercat random jitter fix
With ec_igb or ec_igc native driver: interrupt moderation is irrelevant, they use polling not interrupt.
With ec_generic: interrupt moderation is active and you should disable it with
ethtool -C <iface> adaptive-rx off rx-usecs 0 tx-usecs 0
probably as soon as possible on boot, before ethercat starts.
To know which drive you are using, check your erhercat.conf file
With ec_generic: interrupt moderation is active and you should disable it with
ethtool -C <iface> adaptive-rx off rx-usecs 0 tx-usecs 0
probably as soon as possible on boot, before ethercat starts.
To know which drive you are using, check your erhercat.conf file
---
test signature
Please Log in to join the conversation.
6 months 3 weeks ago #345394
by rodw
<iface> gro off lro off tso off
-set-eee <iface> eee off
Replied by rodw on topic Ethercat random jitter fix
You can use a udev rule to do this. we use one for ethercat to use as an example. You might be able to extend the ethercat script to add ethtool commands for:With ec_igb or ec_igc native driver: interrupt moderation is irrelevant, they use polling not interrupt.
With ec_generic: interrupt moderation is active and you should disable it with
ethtool -C <iface> adaptive-rx off rx-usecs 0 tx-usecs 0
probably as soon as possible on boot, before ethercat starts.
To know which drive you are using, check your erhercat.conf file
<iface> gro off lro off tso off
-set-eee <iface> eee off
Please Log in to join the conversation.
6 months 2 weeks ago #345400
by Hakan
Replied by Hakan on topic Ethercat random jitter fix
ec_generic doesn't add or remove any interrupt moderation.
ec_generic is just a layer on top of linux's normal network driver.
ec_generic is just a layer on top of linux's normal network driver.
Please Log in to join the conversation.
Time to create page: 0.191 seconds
