Ethernet latency issue with 2.9.2 and 7i95T
- Finngineering
- Offline
- Junior Member
Less
More
- Posts: 36
- Thank you received: 22
20 Mar 2024 15:26 #296390
by Finngineering
Ethernet latency issue with 2.9.2 and 7i95T was created by Finngineering
Hello,
I'm currently "restoring" a Maho MH600T to use LinuxCNC, with a Mesa 7i95T as the main interface card:
forum.linuxcnc.org/30-cnc-machines/49758...mizing-a-maho-mh600t
Unfortunately, I have run into issues with ethernet latency, and get unexpected realtime delays and watchdog has bit issues. From monitoring the hm2_7i95.0.read.time, it's evident there are some massive spikes. See the screenshot below and console output from starting LinuxCNC. The highest spike is around 20 000 000, while the base level is around 300 000.
The computer is a HP Z240 SFF Workstation (J9C02ET#ABU) with i7-6700 CPU. I have done quite a bit of reading about other similar issues. The computer has an in-built I219-LM ethernet adapter, that I read somebody else had issues with. So I bought a PCI-e TP-Link TG-3468, which has the Realtek RTL 8168 chipset. But I get the same issues with both cards. And later I read there are also issues with the Realtek chipsets. And it's not easy to find anything else than Intel or Realtek.
I have disable all "performance" and power management features I can find in the BIOS, and modified the kernel options to:Still, no better.
As you might see from the kernel boot options above, I also compiled a custom kernel (actually several), as I read that the issue was with the stock debian kernel. It didn't help me. I followed the instructions here:
forum.linuxcnc.org/10-advanced-configura...6-7-improved-latency
According to some troubleshooting advice by PCM, I also did some ping test:and for a couple of minutes:With a maximum response time of almost 10 ms, no wonder there are some issues.
However, the "normal" system latency does not appear bad. Here is a latency-histogram from surfing the web and writing this post, playing youtube and having 5 glxgears running:
I actually used this same computer on 2.8.4 earlier and without many issues. However, I do think I got the same issues every once in a while. Maybe after an hour or so. But that was with no tuning of BIOS or kernel options and with the Intel network card without changing irq coalescing options (if that was at all relevant at that time).
I start to run out of ideas. But maybe somebody here has some advice?
I'm currently "restoring" a Maho MH600T to use LinuxCNC, with a Mesa 7i95T as the main interface card:
forum.linuxcnc.org/30-cnc-machines/49758...mizing-a-maho-mh600t
Unfortunately, I have run into issues with ethernet latency, and get unexpected realtime delays and watchdog has bit issues. From monitoring the hm2_7i95.0.read.time, it's evident there are some massive spikes. See the screenshot below and console output from starting LinuxCNC. The highest spike is around 20 000 000, while the base level is around 300 000.
Warning: Spoiler!
$ linuxcnc ./MH600T.ini
LINUXCNC - 2.9.2
Machine configuration directory is '/home/maho/linuxcnc/configs/MH600T/.'
Machine configuration file is 'MH600T.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./MH600T.hal
hm2: loading Mesa HostMot2 driver version 0.15
hm2_eth: loading Mesa AnyIO HostMot2 ethernet driver version 0.2
hm2_eth: 10.10.10.10: INFO: Hardware address (MAC): 00:60:1b:15:80:02
hm2_eth: discovered 7I95T
hm2/hm2_7i95.0: Low Level init 0.15
hm2/hm2_7i95.0: Smart Serial Firmware Version 43
Board hm2_7i95.0.7i84.0.0 Hardware Mode 0 = standard
Board hm2_7i95.0.7i84.0.0 Software Mode 0 = input_output
Board hm2_7i95.0.7i84.0.0 Software Mode 1 = io_analog_fieldvoltage
Board hm2_7i95.0.7i84.0.0 Software Mode 2 = io_encoder_analog
hm2/hm2_7i95.0: 58 I/O Pins used:
hm2/hm2_7i95.0: IO Pin 000 (TB3-02/TB3-03): StepGen #0, pin Step (Output)
hm2/hm2_7i95.0: IO Pin 001 (TB3-04/TB3-05): StepGen #0, pin Direction (Output)
hm2/hm2_7i95.0: IO Pin 002 (TB3-08/TB3-09): StepGen #1, pin Step (Output)
hm2/hm2_7i95.0: IO Pin 003 (TB3-10/TB3-11): StepGen #1, pin Direction (Output)
hm2/hm2_7i95.0: IO Pin 004 (TB3-14/TB3-15): StepGen #2, pin Step (Output)
hm2/hm2_7i95.0: IO Pin 005 (TB3-16/TB3-17): StepGen #2, pin Direction (Output)
hm2/hm2_7i95.0: IO Pin 006 (TB3-20/TB3-21): StepGen #3, pin Step (Output)
hm2/hm2_7i95.0: IO Pin 007 (TB3-22/TB3-23): StepGen #3, pin Direction (Output)
hm2/hm2_7i95.0: IO Pin 008 (TB4-02/TB4-03): StepGen #4, pin Step (Output)
hm2/hm2_7i95.0: IO Pin 009 (TB4-04/TB4-05): StepGen #4, pin Direction (Output)
hm2/hm2_7i95.0: IO Pin 010 (TB4-08/TB4-09): StepGen #5, pin Step (Output)
hm2/hm2_7i95.0: IO Pin 011 (TB4-10/TB4-11): StepGen #5, pin Direction (Output)
hm2/hm2_7i95.0: IO Pin 012 (TB4-14/TB4-15): Smart Serial Interface #0, pin rx0 (Input)
hm2/hm2_7i95.0: IO Pin 013 (TB4-16/TB4-17): Smart Serial Interface #0, pin tx0 (Output)
hm2/hm2_7i95.0: IO Pin 014 (TB3-16/TB3-17): Smart Serial Interface #0, pin txen0 (Output)
hm2/hm2_7i95.0: IO Pin 015 (TB4-20/TB4-21): IOPort
hm2/hm2_7i95.0: IO Pin 016 (TB4-22/TB4-23): IOPort
hm2/hm2_7i95.0: IO Pin 017 (TB4-22/TB4-23): IOPort
hm2/hm2_7i95.0: IO Pin 018 (TB1-01/TB1-09): Muxed Encoder #0, pin Muxed A (Input)
hm2/hm2_7i95.0: IO Pin 019 (TB1-04/TB1-12): Muxed Encoder #0, pin Muxed B (Input)
hm2/hm2_7i95.0: IO Pin 020 (TB1-07/TB1-15): Muxed Encoder #0, pin Muxed Index (Input)
hm2/hm2_7i95.0: IO Pin 021 (TB1-17/TB2-01): Muxed Encoder #1, pin Muxed A (Input)
hm2/hm2_7i95.0: IO Pin 022 (TB1-20/TB2-04): Muxed Encoder #1, pin Muxed B (Input)
hm2/hm2_7i95.0: IO Pin 023 (TB1-23/TB2-07): Muxed Encoder #1, pin Muxed Index (Input)
hm2/hm2_7i95.0: IO Pin 024 (TB2-09/TB2-17): Muxed Encoder #2, pin Muxed A (Input)
hm2/hm2_7i95.0: IO Pin 025 (TB2-12/TB2-20): Muxed Encoder #2, pin Muxed B (Input)
hm2/hm2_7i95.0: IO Pin 026 (TB2-15/TB2-23): Muxed Encoder #2, pin Muxed Index (Input)
hm2/hm2_7i95.0: IO Pin 027 (Internal EncMux): Muxed Encoder Select #0, pin Mux Select 0 (Output)
hm2/hm2_7i95.0: IO Pin 028 (Internal InMux0): InMux Input Mux #0, pin addr0 (Output)
hm2/hm2_7i95.0: IO Pin 029 (Internal InMux1): InMux Input Mux #0, pin addr1 (Output)
hm2/hm2_7i95.0: IO Pin 030 (Internal InMux2): InMux Input Mux #0, pin addr2 (Output)
hm2/hm2_7i95.0: IO Pin 031 (Internal InMux3): InMux Input Mux #0, pin addr3 (Output)
hm2/hm2_7i95.0: IO Pin 032 (Internal InMux4): InMux Input Mux #0, pin addr4 (Output)
hm2/hm2_7i95.0: IO Pin 033 (Internal InMuxData): InMux Input Mux #0, pin muxdata (Input)
hm2/hm2_7i95.0: IO Pin 034 (TB5-13/TB5-14): SSR #0, pin Out-00 (Output)
hm2/hm2_7i95.0: IO Pin 035 (TB5-15/TB5-16): SSR #0, pin Out-01 (Output)
hm2/hm2_7i95.0: IO Pin 036 (TB5-17/TB5-18): SSR #0, pin Out-02 (Output)
hm2/hm2_7i95.0: IO Pin 037 (TB5-19/TB5-20): SSR #0, pin Out-03 (Output)
hm2/hm2_7i95.0: IO Pin 038 (TB5-21/TB5-22): SSR #0, pin Out-04 (Output)
hm2/hm2_7i95.0: IO Pin 039 (TB5-23/TB5-24): SSR #0, pin Out-05 (Output)
hm2/hm2_7i95.0: IO Pin 040 (internal): SSR #0, pin AC Ref (internal) (Output)
hm2/hm2_7i95.0: IO Pin 041 (P1-01/DB25-01): IOPort
hm2/hm2_7i95.0: IO Pin 042 (P1-02/DB25-14): IOPort
hm2/hm2_7i95.0: IO Pin 043 (P1-03/DB25-02): IOPort
hm2/hm2_7i95.0: IO Pin 044 (P1-04/DB25-15): IOPort
hm2/hm2_7i95.0: IO Pin 045 (P1-05/DB25-03): IOPort
hm2/hm2_7i95.0: IO Pin 046 (P1-06/DB25-16): IOPort
hm2/hm2_7i95.0: IO Pin 047 (P1-07/DB25-04): IOPort
hm2/hm2_7i95.0: IO Pin 048 (P1-08/DB25-17): IOPort
hm2/hm2_7i95.0: IO Pin 049 (P1-09/DB25-05): IOPort
hm2/hm2_7i95.0: IO Pin 050 (P1-11/DB25-06): IOPort
hm2/hm2_7i95.0: IO Pin 051 (P1-13/DB25-07): IOPort
hm2/hm2_7i95.0: IO Pin 052 (P1-15/DB25-08): IOPort
hm2/hm2_7i95.0: IO Pin 053 (P1-17/DB25-09): IOPort
hm2/hm2_7i95.0: IO Pin 054 (P1-19/DB25-10): IOPort
hm2/hm2_7i95.0: IO Pin 055 (P1-21/DB25-11): IOPort
hm2/hm2_7i95.0: IO Pin 056 (P1-23/DB25-12): IOPort
hm2/hm2_7i95.0: IO Pin 057 (P1-25/DB25-13): IOPort
hm2/hm2_7i95.0: registered
Found file(REL): ./custom.hal
[Gmoccapy.QTVCP.QT_ISTAT][WARNING] INI Parsing Error, No DEFAULT_SPINDLE_0_SPEED Entry in DISPLAY, Using: 200 (qt_istat.py:532)
[Gmoccapy.QTVCP.QT_ISTAT][WARNING] INI Parsing Error, No MIN_SPINDLE_0_SPEED Entry in DISPLAY, Using: 100 (qt_istat.py:532)
[Gmoccapy.QTVCP.QT_ISTAT][WARNING] INI Parsing Error, No MAX_SPINDLE_0_SPEED Entry in DISPLAY, Using: 2500 (qt_istat.py:532)
[Gmoccapy.QTVCP.QT_ISTAT][WARNING] INI Parsing Error, No MAX_SPINDLE_0_OVERRIDE Entry in DISPLAY, Using: 1 (qt_istat.py:532)
[Gmoccapy.QTVCP.QT_ISTAT][WARNING] INI Parsing Error, No MIN_SPINDLE_0_OVERRIDE Entry in DISPLAY, Using: 0.5 (qt_istat.py:532)
(gmoccapy:13441): Gtk-CRITICAL **: 16:38:14.704: gtk_entry_set_text: assertion 'text != NULL' failed
[Gmoccapy.GMOCCAPY.GETINIINFO][WARNING] No DEFAULT_SPINDLE_SPEED entry found in [DISPLAY] of INI file (getiniinfo.py:282)
task: main loop took 0.131681 seconds
[Gmoccapy][WARNING] No virtual keyboard installed, we checked for <onboard>. Try 'sudo apt-get install onboard'. (gmoccapy:2080)
hm2/hm2_7i95.0: Watchdog has bit! (set the .has-bit pin to False to resume)
hm2/hm2_7i95.0: Watchdog has bit! (set the .has-bit pin to False to resume)
Unexpected realtime delay on task 0 with period 2000000
This Message will only display once per session.
Run the Latency Test and resolve before continuing.
Unexpected realtime delay on task 0 with period 2000000
This Message will only display once per session.
Run the Latency Test and resolve before continuing.
hm2/hm2_7i95.0: Smart serial card hm2_7i95.0.7i84.0.0 local error = (13) Communication error
hm2/hm2_7i95.0: Smart serial card hm2_7i95.0.7i84.0.0 local error = (3) Timeout
hm2/hm2_7i95.0: Smart Serial Comms Error: There have been more than 1 errors in 10 thread executions at least 200 times. See other error messages for details.
hm2/hm2_7i95.0: ***Smart Serial Port 0 will be stopped***
hm2/hm2_7i95.0: Smart serial card hm2_7i95.0.7i84.0.0 local error = (13) Communication error
hm2/hm2_7i95.0: Smart serial card hm2_7i95.0.7i84.0.0 local error = (3) Timeout
hm2/hm2_7i95.0: Smart Serial Comms Error: There have been more than 1 errors in 10 thread executions at least 200 times. See other error messages for details.
hm2/hm2_7i95.0: ***Smart Serial Port 0 will be stopped***
LINUXCNC - 2.9.2
Machine configuration directory is '/home/maho/linuxcnc/configs/MH600T/.'
Machine configuration file is 'MH600T.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./MH600T.hal
hm2: loading Mesa HostMot2 driver version 0.15
hm2_eth: loading Mesa AnyIO HostMot2 ethernet driver version 0.2
hm2_eth: 10.10.10.10: INFO: Hardware address (MAC): 00:60:1b:15:80:02
hm2_eth: discovered 7I95T
hm2/hm2_7i95.0: Low Level init 0.15
hm2/hm2_7i95.0: Smart Serial Firmware Version 43
Board hm2_7i95.0.7i84.0.0 Hardware Mode 0 = standard
Board hm2_7i95.0.7i84.0.0 Software Mode 0 = input_output
Board hm2_7i95.0.7i84.0.0 Software Mode 1 = io_analog_fieldvoltage
Board hm2_7i95.0.7i84.0.0 Software Mode 2 = io_encoder_analog
hm2/hm2_7i95.0: 58 I/O Pins used:
hm2/hm2_7i95.0: IO Pin 000 (TB3-02/TB3-03): StepGen #0, pin Step (Output)
hm2/hm2_7i95.0: IO Pin 001 (TB3-04/TB3-05): StepGen #0, pin Direction (Output)
hm2/hm2_7i95.0: IO Pin 002 (TB3-08/TB3-09): StepGen #1, pin Step (Output)
hm2/hm2_7i95.0: IO Pin 003 (TB3-10/TB3-11): StepGen #1, pin Direction (Output)
hm2/hm2_7i95.0: IO Pin 004 (TB3-14/TB3-15): StepGen #2, pin Step (Output)
hm2/hm2_7i95.0: IO Pin 005 (TB3-16/TB3-17): StepGen #2, pin Direction (Output)
hm2/hm2_7i95.0: IO Pin 006 (TB3-20/TB3-21): StepGen #3, pin Step (Output)
hm2/hm2_7i95.0: IO Pin 007 (TB3-22/TB3-23): StepGen #3, pin Direction (Output)
hm2/hm2_7i95.0: IO Pin 008 (TB4-02/TB4-03): StepGen #4, pin Step (Output)
hm2/hm2_7i95.0: IO Pin 009 (TB4-04/TB4-05): StepGen #4, pin Direction (Output)
hm2/hm2_7i95.0: IO Pin 010 (TB4-08/TB4-09): StepGen #5, pin Step (Output)
hm2/hm2_7i95.0: IO Pin 011 (TB4-10/TB4-11): StepGen #5, pin Direction (Output)
hm2/hm2_7i95.0: IO Pin 012 (TB4-14/TB4-15): Smart Serial Interface #0, pin rx0 (Input)
hm2/hm2_7i95.0: IO Pin 013 (TB4-16/TB4-17): Smart Serial Interface #0, pin tx0 (Output)
hm2/hm2_7i95.0: IO Pin 014 (TB3-16/TB3-17): Smart Serial Interface #0, pin txen0 (Output)
hm2/hm2_7i95.0: IO Pin 015 (TB4-20/TB4-21): IOPort
hm2/hm2_7i95.0: IO Pin 016 (TB4-22/TB4-23): IOPort
hm2/hm2_7i95.0: IO Pin 017 (TB4-22/TB4-23): IOPort
hm2/hm2_7i95.0: IO Pin 018 (TB1-01/TB1-09): Muxed Encoder #0, pin Muxed A (Input)
hm2/hm2_7i95.0: IO Pin 019 (TB1-04/TB1-12): Muxed Encoder #0, pin Muxed B (Input)
hm2/hm2_7i95.0: IO Pin 020 (TB1-07/TB1-15): Muxed Encoder #0, pin Muxed Index (Input)
hm2/hm2_7i95.0: IO Pin 021 (TB1-17/TB2-01): Muxed Encoder #1, pin Muxed A (Input)
hm2/hm2_7i95.0: IO Pin 022 (TB1-20/TB2-04): Muxed Encoder #1, pin Muxed B (Input)
hm2/hm2_7i95.0: IO Pin 023 (TB1-23/TB2-07): Muxed Encoder #1, pin Muxed Index (Input)
hm2/hm2_7i95.0: IO Pin 024 (TB2-09/TB2-17): Muxed Encoder #2, pin Muxed A (Input)
hm2/hm2_7i95.0: IO Pin 025 (TB2-12/TB2-20): Muxed Encoder #2, pin Muxed B (Input)
hm2/hm2_7i95.0: IO Pin 026 (TB2-15/TB2-23): Muxed Encoder #2, pin Muxed Index (Input)
hm2/hm2_7i95.0: IO Pin 027 (Internal EncMux): Muxed Encoder Select #0, pin Mux Select 0 (Output)
hm2/hm2_7i95.0: IO Pin 028 (Internal InMux0): InMux Input Mux #0, pin addr0 (Output)
hm2/hm2_7i95.0: IO Pin 029 (Internal InMux1): InMux Input Mux #0, pin addr1 (Output)
hm2/hm2_7i95.0: IO Pin 030 (Internal InMux2): InMux Input Mux #0, pin addr2 (Output)
hm2/hm2_7i95.0: IO Pin 031 (Internal InMux3): InMux Input Mux #0, pin addr3 (Output)
hm2/hm2_7i95.0: IO Pin 032 (Internal InMux4): InMux Input Mux #0, pin addr4 (Output)
hm2/hm2_7i95.0: IO Pin 033 (Internal InMuxData): InMux Input Mux #0, pin muxdata (Input)
hm2/hm2_7i95.0: IO Pin 034 (TB5-13/TB5-14): SSR #0, pin Out-00 (Output)
hm2/hm2_7i95.0: IO Pin 035 (TB5-15/TB5-16): SSR #0, pin Out-01 (Output)
hm2/hm2_7i95.0: IO Pin 036 (TB5-17/TB5-18): SSR #0, pin Out-02 (Output)
hm2/hm2_7i95.0: IO Pin 037 (TB5-19/TB5-20): SSR #0, pin Out-03 (Output)
hm2/hm2_7i95.0: IO Pin 038 (TB5-21/TB5-22): SSR #0, pin Out-04 (Output)
hm2/hm2_7i95.0: IO Pin 039 (TB5-23/TB5-24): SSR #0, pin Out-05 (Output)
hm2/hm2_7i95.0: IO Pin 040 (internal): SSR #0, pin AC Ref (internal) (Output)
hm2/hm2_7i95.0: IO Pin 041 (P1-01/DB25-01): IOPort
hm2/hm2_7i95.0: IO Pin 042 (P1-02/DB25-14): IOPort
hm2/hm2_7i95.0: IO Pin 043 (P1-03/DB25-02): IOPort
hm2/hm2_7i95.0: IO Pin 044 (P1-04/DB25-15): IOPort
hm2/hm2_7i95.0: IO Pin 045 (P1-05/DB25-03): IOPort
hm2/hm2_7i95.0: IO Pin 046 (P1-06/DB25-16): IOPort
hm2/hm2_7i95.0: IO Pin 047 (P1-07/DB25-04): IOPort
hm2/hm2_7i95.0: IO Pin 048 (P1-08/DB25-17): IOPort
hm2/hm2_7i95.0: IO Pin 049 (P1-09/DB25-05): IOPort
hm2/hm2_7i95.0: IO Pin 050 (P1-11/DB25-06): IOPort
hm2/hm2_7i95.0: IO Pin 051 (P1-13/DB25-07): IOPort
hm2/hm2_7i95.0: IO Pin 052 (P1-15/DB25-08): IOPort
hm2/hm2_7i95.0: IO Pin 053 (P1-17/DB25-09): IOPort
hm2/hm2_7i95.0: IO Pin 054 (P1-19/DB25-10): IOPort
hm2/hm2_7i95.0: IO Pin 055 (P1-21/DB25-11): IOPort
hm2/hm2_7i95.0: IO Pin 056 (P1-23/DB25-12): IOPort
hm2/hm2_7i95.0: IO Pin 057 (P1-25/DB25-13): IOPort
hm2/hm2_7i95.0: registered
Found file(REL): ./custom.hal
[Gmoccapy.QTVCP.QT_ISTAT][WARNING] INI Parsing Error, No DEFAULT_SPINDLE_0_SPEED Entry in DISPLAY, Using: 200 (qt_istat.py:532)
[Gmoccapy.QTVCP.QT_ISTAT][WARNING] INI Parsing Error, No MIN_SPINDLE_0_SPEED Entry in DISPLAY, Using: 100 (qt_istat.py:532)
[Gmoccapy.QTVCP.QT_ISTAT][WARNING] INI Parsing Error, No MAX_SPINDLE_0_SPEED Entry in DISPLAY, Using: 2500 (qt_istat.py:532)
[Gmoccapy.QTVCP.QT_ISTAT][WARNING] INI Parsing Error, No MAX_SPINDLE_0_OVERRIDE Entry in DISPLAY, Using: 1 (qt_istat.py:532)
[Gmoccapy.QTVCP.QT_ISTAT][WARNING] INI Parsing Error, No MIN_SPINDLE_0_OVERRIDE Entry in DISPLAY, Using: 0.5 (qt_istat.py:532)
(gmoccapy:13441): Gtk-CRITICAL **: 16:38:14.704: gtk_entry_set_text: assertion 'text != NULL' failed
[Gmoccapy.GMOCCAPY.GETINIINFO][WARNING] No DEFAULT_SPINDLE_SPEED entry found in [DISPLAY] of INI file (getiniinfo.py:282)
task: main loop took 0.131681 seconds
[Gmoccapy][WARNING] No virtual keyboard installed, we checked for <onboard>. Try 'sudo apt-get install onboard'. (gmoccapy:2080)
hm2/hm2_7i95.0: Watchdog has bit! (set the .has-bit pin to False to resume)
hm2/hm2_7i95.0: Watchdog has bit! (set the .has-bit pin to False to resume)
Unexpected realtime delay on task 0 with period 2000000
This Message will only display once per session.
Run the Latency Test and resolve before continuing.
Unexpected realtime delay on task 0 with period 2000000
This Message will only display once per session.
Run the Latency Test and resolve before continuing.
hm2/hm2_7i95.0: Smart serial card hm2_7i95.0.7i84.0.0 local error = (13) Communication error
hm2/hm2_7i95.0: Smart serial card hm2_7i95.0.7i84.0.0 local error = (3) Timeout
hm2/hm2_7i95.0: Smart Serial Comms Error: There have been more than 1 errors in 10 thread executions at least 200 times. See other error messages for details.
hm2/hm2_7i95.0: ***Smart Serial Port 0 will be stopped***
hm2/hm2_7i95.0: Smart serial card hm2_7i95.0.7i84.0.0 local error = (13) Communication error
hm2/hm2_7i95.0: Smart serial card hm2_7i95.0.7i84.0.0 local error = (3) Timeout
hm2/hm2_7i95.0: Smart Serial Comms Error: There have been more than 1 errors in 10 thread executions at least 200 times. See other error messages for details.
hm2/hm2_7i95.0: ***Smart Serial Port 0 will be stopped***
The computer is a HP Z240 SFF Workstation (J9C02ET#ABU) with i7-6700 CPU. I have done quite a bit of reading about other similar issues. The computer has an in-built I219-LM ethernet adapter, that I read somebody else had issues with. So I bought a PCI-e TP-Link TG-3468, which has the Realtek RTL 8168 chipset. But I get the same issues with both cards. And later I read there are also issues with the Realtek chipsets. And it's not easy to find anything else than Intel or Realtek.
I have disable all "performance" and power management features I can find in the BIOS, and modified the kernel options to:
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-6.6.7-rt18-linuxcnc root=UUID=a2994d0f-a7e5-42a0-a350-8616556fa365 ro quiet idle=poll intel_idle.max_cstate=1 processor.max_cstate=1 i915.enable_dc=0
As you might see from the kernel boot options above, I also compiled a custom kernel (actually several), as I read that the issue was with the stock debian kernel. It didn't help me. I followed the instructions here:
forum.linuxcnc.org/10-advanced-configura...6-7-improved-latency
According to some troubleshooting advice by PCM, I also did some ping test:
$ ping -c 5 -i .2 10.10.10.10
PING 10.10.10.10 (10.10.10.10) 56(84) bytes of data.
64 bytes from 10.10.10.10: icmp_seq=1 ttl=64 time=0.101 ms
64 bytes from 10.10.10.10: icmp_seq=2 ttl=64 time=0.061 ms
64 bytes from 10.10.10.10: icmp_seq=3 ttl=64 time=0.067 ms
64 bytes from 10.10.10.10: icmp_seq=4 ttl=64 time=0.061 ms
64 bytes from 10.10.10.10: icmp_seq=5 ttl=64 time=0.060 ms
--- 10.10.10.10 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 814ms
rtt min/avg/max/mdev = 0.060/0.070/0.101/0.015 ms
$ sudo chrt 99 ping -i .001 -q 10.10.10.10
PING 10.10.10.10 (10.10.10.10) 56(84) bytes of data.
--- 10.10.10.10 ping statistics ---
98834 packets transmitted, 98833 received, 0.0010118% packet loss, time 99322ms
rtt min/avg/max/mdev = 0.049/0.068/9.884/0.133 ms
However, the "normal" system latency does not appear bad. Here is a latency-histogram from surfing the web and writing this post, playing youtube and having 5 glxgears running:
I actually used this same computer on 2.8.4 earlier and without many issues. However, I do think I got the same issues every once in a while. Maybe after an hour or so. But that was with no tuning of BIOS or kernel options and with the Intel network card without changing irq coalescing options (if that was at all relevant at that time).
I start to run out of ideas. But maybe somebody here has some advice?
Attachments:
Please Log in or Create an account to join the conversation.
20 Mar 2024 15:43 #296391
by PCW
Replied by PCW on topic Ethernet latency issue with 2.9.2 and 7i95T
That is a huge latency spike (almost 6 ms!)
Have you disabled all power management options/turbo modes/hyperthreading in the BIOS?
Have you disabled all power management options/turbo modes/hyperthreading in the BIOS?
Please Log in or Create an account to join the conversation.
- Finngineering
- Offline
- Junior Member
Less
More
- Posts: 36
- Thank you received: 22
20 Mar 2024 16:13 #296397
by Finngineering
Replied by Finngineering on topic Ethernet latency issue with 2.9.2 and 7i95T
Yes, power management, turbo and hyperthreading disabled in BIOS. I can take a photo later for reference.
However, just after I wrote the post, it occurred to me that for the sake of completeness, I should remove the USB/ethernet dongle I use for internet access. At the same time, I also removed a wireless ethernet card I had installed previously. Lo and behold, after this I have not seen the errors, although it has only been half an hour or so. I plugged the USB/ethernet dongle back in to write this message, and its still not complaining.
I will monitor for a few hours and write a new post with the results. And I will figure out if it was the wireless ethernet card (TP-Link TL-WN781ND) or the USB/ethernet dongle that was causing the issues. And I will check if I can go back to the stock kernel as well. I will report back once I have some more information to share.
By the way, what is the formula to convert tmax to milliseconds (if indeed there is such a thing)?
However, just after I wrote the post, it occurred to me that for the sake of completeness, I should remove the USB/ethernet dongle I use for internet access. At the same time, I also removed a wireless ethernet card I had installed previously. Lo and behold, after this I have not seen the errors, although it has only been half an hour or so. I plugged the USB/ethernet dongle back in to write this message, and its still not complaining.
I will monitor for a few hours and write a new post with the results. And I will figure out if it was the wireless ethernet card (TP-Link TL-WN781ND) or the USB/ethernet dongle that was causing the issues. And I will check if I can go back to the stock kernel as well. I will report back once I have some more information to share.
By the way, what is the formula to convert tmax to milliseconds (if indeed there is such a thing)?
Please Log in or Create an account to join the conversation.
20 Mar 2024 16:25 - 20 Mar 2024 16:25 #296399
by PCW
Replied by PCW on topic Ethernet latency issue with 2.9.2 and 7i95T
Non USB wireless cards are very often implicated in poor network latency
(I think it because actual BIOS add-on card code is run directly from ROMs on these cards)
tmax values (on X86) are in clock cycles so time in seconds = tmax_value/cpu_clock _frequency
(tmax values on ARM are in ns)
(I think it because actual BIOS add-on card code is run directly from ROMs on these cards)
tmax values (on X86) are in clock cycles so time in seconds = tmax_value/cpu_clock _frequency
(tmax values on ARM are in ns)
Last edit: 20 Mar 2024 16:25 by PCW.
Please Log in or Create an account to join the conversation.
- Finngineering
- Offline
- Junior Member
Less
More
- Posts: 36
- Thank you received: 22
20 Mar 2024 20:49 #296408
by Finngineering
Replied by Finngineering on topic Ethernet latency issue with 2.9.2 and 7i95T
The computer was now running for ~2.5 hours without issue, and the hm2_7i95.0.read.tmax was around 900 000. I then turned off the computer and reinstalled the wireless card. And again I get the error messages almost immediately upon starting LinuxCNC. So for me it's quite clear that the wireless card was causing issues for me. And that wireless card was not connected to a network (never even configured to connect to one). Anyway, I never planned to use that card other than for installation/setup, so no problem for me.
I will see what more I can determine. And if the stock kernel will work. But it may be a couple of days before I get the chance to do that.
Thanks for the tmax explanation. So in my case with "baseline" around 300 000, it's just shy of 0.1 ms with 3.4 GHz clock frequency.
BIOS photos also attached, but probably of no interest as of now.
I will see what more I can determine. And if the stock kernel will work. But it may be a couple of days before I get the chance to do that.
Thanks for the tmax explanation. So in my case with "baseline" around 300 000, it's just shy of 0.1 ms with 3.4 GHz clock frequency.
BIOS photos also attached, but probably of no interest as of now.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19300
- Thank you received: 6462
20 Mar 2024 21:01 #296410
by tommylight
Replied by tommylight on topic Ethernet latency issue with 2.9.2 and 7i95T
Try leaving multi processor on, otherwise the PC might be very sluggish.
It has never caused issues for me.
It has never caused issues for me.
Please Log in or Create an account to join the conversation.
20 Mar 2024 21:15 #296413
by PCW
Replied by PCW on topic Ethernet latency issue with 2.9.2 and 7i95T
Yes, use all cores, worst case you can enable the last core for LinuxCNC use with isolcpus
Please Log in or Create an account to join the conversation.
- Finngineering
- Offline
- Junior Member
Less
More
- Posts: 36
- Thank you received: 22
20 Mar 2024 21:27 #296414
by Finngineering
Replied by Finngineering on topic Ethernet latency issue with 2.9.2 and 7i95T
I turned off all most "extra" features in BIOS, but maybe went one step too far with that one. (The computer is not sluggish at all, though)
I will re-enable it, and may go a bit deeper with isolcpus and the IRQ affinity/routing to see how that works out:
forum.linuxcnc.org/38-general-linuxcnc-q...ead-and-irq-affinity
I just saw you PCW mentioned that thread in another reply. That is one thread I had not come across before (even if its marked as sticky).
I will re-enable it, and may go a bit deeper with isolcpus and the IRQ affinity/routing to see how that works out:
forum.linuxcnc.org/38-general-linuxcnc-q...ead-and-irq-affinity
I just saw you PCW mentioned that thread in another reply. That is one thread I had not come across before (even if its marked as sticky).
Please Log in or Create an account to join the conversation.
- Finngineering
- Offline
- Junior Member
Less
More
- Posts: 36
- Thank you received: 22
25 Mar 2024 15:54 #296732
by Finngineering
Replied by Finngineering on topic Ethernet latency issue with 2.9.2 and 7i95T
Today I did some more tests, and below are the outcomes.
I enabled multiprocessor in BIOS settings. Without isolcpus and without IRQ rerouting, it did not work great. But when adding isolcpus and IRQ rerouting, the tmax values seem to top out around 1 000 000 (with 10 glxgears and youtube playing). Slightly better results with the Realtek cards than with the integrated Intel chipset, so I will use the Realtek for Mesa communication.
Changing back to the stock kernel caused no issues.
So, the problem is solved. And in the end it turned out to be only the unused Wifi card that I had plugged in. Ugh. I had that card installed in the computer already with LinuxCNC 2.8.4, and did not cause at least big issues then.
I enabled multiprocessor in BIOS settings. Without isolcpus and without IRQ rerouting, it did not work great. But when adding isolcpus and IRQ rerouting, the tmax values seem to top out around 1 000 000 (with 10 glxgears and youtube playing). Slightly better results with the Realtek cards than with the integrated Intel chipset, so I will use the Realtek for Mesa communication.
Changing back to the stock kernel caused no issues.
So, the problem is solved. And in the end it turned out to be only the unused Wifi card that I had plugged in. Ugh. I had that card installed in the computer already with LinuxCNC 2.8.4, and did not cause at least big issues then.
Please Log in or Create an account to join the conversation.
Time to create page: 0.101 seconds