Reduce read-all timing 7i76e + 7i77
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 17462
- Thank you received: 5101
02 Dec 2025 20:46 - 02 Dec 2025 20:53 #339664
by PCW
Replied by PCW on topic Reduce read-all timing 7i76e + 7i77
That's a great condensed source of network latency reducing tips
Only quibble I would have is that:
setp hm2_7i76e.0.read.timeout 100000
Is not correct as the hm2 read timeout is scaled in percent of the servo period
EDIT: actually that is correct as values larger than 100 are interpreted as ns
But a 100 usec margin is very small on most systems and will likely result in many
unnecessarily dropped packets .
Default is 80% of servo period and this is fine normally
Only quibble I would have is that:
setp hm2_7i76e.0.read.timeout 100000
EDIT: actually that is correct as values larger than 100 are interpreted as ns
But a 100 usec margin is very small on most systems and will likely result in many
unnecessarily dropped packets .
Default is 80% of servo period and this is fine normally
Last edit: 02 Dec 2025 20:53 by PCW.
The following user(s) said Thank You: rodw, endian
Please Log in or Create an account to join the conversation.
- endian
-
Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 249
- Thank you received: 73
03 Dec 2025 04:03 #339674
by endian
Replied by endian on topic Reduce read-all timing 7i76e + 7i77
If gentelmen have any other tips for reducing latency .. share it please
I did changes for my machine and it runs for few days at 3khz without problem...
Reading the datas take less then 250us with timeout 100000ns and 250us is now limit... + Other stuff in the thread and we are under the 300us
Motion is smoother by the sound and scope profile and compensation of position in the velocity mode is faster==smoother ... It is real difference now
I did changes for my machine and it runs for few days at 3khz without problem...
Reading the datas take less then 250us with timeout 100000ns and 250us is now limit... + Other stuff in the thread and we are under the 300us
Motion is smoother by the sound and scope profile and compensation of position in the velocity mode is faster==smoother ... It is real difference now
The following user(s) said Thank You: meister
Please Log in or Create an account to join the conversation.
- rodw
-
- Away
- Platinum Member
-
Less
More
- Posts: 11539
- Thank you received: 3865
03 Dec 2025 09:27 #339681
by rodw
Replied by rodw on topic Reduce read-all timing 7i76e + 7i77
I don't think you can improve much on this without building the kernel from source and changing some of the config parameters. (which is not hard)
here are a couple of links I had saved
ubuntu.com/blog/real-time-kernel-tuning
eci.intel.com/docs/3.3/development/perfo...e/rt_scheduling.html
I did try installing the Intel tools but they did not like Trixie.
the only other idea I explored was to use time sensitive networking (TSN) protocols en.wikipedia.org/wiki/Time-Sensitive_Networking
But I think this would require writing a new hm2-eth driver (hm2-tsn?) and changes to the mesa hardware to support it.
This should solve the issue where networking does not currently support real time (networks are inherently store and forward so never designed for RT comms) but its not a trivial project. This would require TSN capable network cards but these are available at reasonable cost but the common entry level i225/i226 cards do not support TSN. ref: www.intel.com/content/www/us/en/support/...rs-up-to-2-5gbe.html I did find some for USD $70 to $150
here are a couple of links I had saved
ubuntu.com/blog/real-time-kernel-tuning
eci.intel.com/docs/3.3/development/perfo...e/rt_scheduling.html
I did try installing the Intel tools but they did not like Trixie.
the only other idea I explored was to use time sensitive networking (TSN) protocols en.wikipedia.org/wiki/Time-Sensitive_Networking
But I think this would require writing a new hm2-eth driver (hm2-tsn?) and changes to the mesa hardware to support it.
This should solve the issue where networking does not currently support real time (networks are inherently store and forward so never designed for RT comms) but its not a trivial project. This would require TSN capable network cards but these are available at reasonable cost but the common entry level i225/i226 cards do not support TSN. ref: www.intel.com/content/www/us/en/support/...rs-up-to-2-5gbe.html I did find some for USD $70 to $150
The following user(s) said Thank You: endian
Please Log in or Create an account to join the conversation.
- endian
-
Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 249
- Thank you received: 73
03 Dec 2025 18:31 #339696
by endian
Replied by endian on topic Reduce read-all timing 7i76e + 7i77
I think it is higher ladies school ... Customizing the kernel we will lost possibility of regular installation maybe ... Of course we can have own kernel but there will be limitations of any updates... But on other side who will use it from regular users... but I am not expert of kernels at all.. i know just how to create great ethercat topology with low thread time at budget iron..
I am not expert of Lcnc too.. but Lcnc needs two major improvements... Latency of networking(we can use mesa and peer to peer connection) and new 7phase trajectory planner(created by nonRT + RT part)
Both are non trivial and boths are long range run..
I am not expert of Lcnc too.. but Lcnc needs two major improvements... Latency of networking(we can use mesa and peer to peer connection) and new 7phase trajectory planner(created by nonRT + RT part)
Both are non trivial and boths are long range run..
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
- rodw
-
- Away
- Platinum Member
-
Less
More
- Posts: 11539
- Thank you received: 3865
03 Dec 2025 19:55 #339702
by rodw
Replied by rodw on topic Reduce read-all timing 7i76e + 7i77
@endian, you may be interested to read the ethercat master docs Chapter 4, networking where it explains its interrupt-less network drivers that bypass all of the CPU affinity requirement...
etherlab.org/en_GB/ethercat
Also, ethercat has a number of specific NIC drivers but I seem to remember these are not included in the deb file in their repo and you need to compile from source to obtain them. It looks like they now support the Trixie 6.12 kernel. Driver Source etherlab.org/en_GB/ethercathttps://gitla...vices?ref_type=heads
drivers are loaded by ethercat.conf in place of ec_generic. It would be interesting to see if the hm2_eth driver could be modified to use the ethercat drivers
etherlab.org/en_GB/ethercat
Also, ethercat has a number of specific NIC drivers but I seem to remember these are not included in the deb file in their repo and you need to compile from source to obtain them. It looks like they now support the Trixie 6.12 kernel. Driver Source etherlab.org/en_GB/ethercathttps://gitla...vices?ref_type=heads
drivers are loaded by ethercat.conf in place of ec_generic. It would be interesting to see if the hm2_eth driver could be modified to use the ethercat drivers
Please Log in or Create an account to join the conversation.
- endian
-
Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 249
- Thank you received: 73
03 Dec 2025 20:06 #339704
by endian
Replied by endian on topic Reduce read-all timing 7i76e + 7i77
Yes, i read thier manual 1k times.. it is pretty solid extraction of what we all need...
Yes I am recompiling everytime to native NIC driver as common e1000e or rtl8190too ... It works pretty solid for 8khz thread
8190too are basically free stuff on the market right now it cost few bucks
There are native drivers for beckhoff too but I have never tried them yet ...
I am not expert in this drivers ..but if it will improve my latency i need them all ...
Yes I am recompiling everytime to native NIC driver as common e1000e or rtl8190too ... It works pretty solid for 8khz thread
8190too are basically free stuff on the market right now it cost few bucks
There are native drivers for beckhoff too but I have never tried them yet ...
I am not expert in this drivers ..but if it will improve my latency i need them all ...
Please Log in or Create an account to join the conversation.
- rodw
-
- Away
- Platinum Member
-
Less
More
- Posts: 11539
- Thank you received: 3865
03 Dec 2025 20:13 #339705
by rodw
Replied by rodw on topic Reduce read-all timing 7i76e + 7i77
Also, I did not see where you are disabling Energy Efficient Ethernet. It is supposed to be disabled by default but this is not always the case. There are some flags that can be set in GRUB but they are driver specific. eg. igb.EEE=0
I have not tested this but This is a robust way to ensure EEE is disabled on every boot. Create a new systemd service file:
sudo geany /etc/systemd/system/disable-eee.service
Enable and start the service:
I have not tested this but This is a robust way to ensure EEE is disabled on every boot. Create a new systemd service file:
sudo geany /etc/systemd/system/disable-eee.service
- Add the following content, replacing enp6s0 with your interface name. This service will run ethtool after the network is up.
[Unit]Description=Disable Energy Efficient Ethernet (EEE)After=network-online.target [Service]Type=oneshotExecStart=/usr/sbin/ethtool --set-eee enp6s0 eee off [Install]WantedBy=multi-user.target- Save and close the file.
sudo systemctl daemon-reloadsudo systemctl enable disable-eee.service
sudo systemctl start disable-eee.service
The following user(s) said Thank You: endian
Please Log in or Create an account to join the conversation.
Time to create page: 0.150 seconds