performance improvement suggestions

More
13 Feb 2021 22:34 - 14 Feb 2021 12:04 #198740 by robertspark
I'm finally getting linuxcnc working (almost....). .... on a working setup.

however with a 1000000 servo loop I get this message for both the 7i76e and the 7i92h

hm2/hm2_7i92.0: error finishing read

and the GUI locks up

if I change the servo loop to 2000000 the message goes away


7i76E (plasma, mill and router) + 7i92 & 7i76 (lathe)

fanless pc i7-5500u, dual SSD (Samsung 860 Evo), 8gb ram, dual intel gigabit Ethernet ports (wg82583v)., configured for 10.10.10.10 and 10.10.10.11 for Mesa hardware.

linuxcnc is installed via 2.8 iso, upgraded to 2.9 master via buildbot.

latency jitter hovers around 32,000 and the highest I've seen is 50,000.

the fanless pc does not have an onboard WiFi, but it's provided via pcie card (intel WiFi link N 6200. I have removed it and used a usb WiFi dongle and it made no change to latency.

I have an "AC " usb dongle and also an AX200 pcie WiFi card.... but the 4.xxx RT-Preempt kernel just won't recognise them.

I suspect my problem is network port settings related....

all steedstep, hyperthreading, etc etc are disabled in the bios.

network manager is installed and wicd is removed.

I also tried editing the etc/..../ interfaces file with the sections pcw suggests adding for intel cards (didn't seem to make any difference)

should I try a newer precompiled kernel from buster backports (5.xxx) I think is available as it may better match my newer hardware?

happy to provide screenshots or try anything.

thanks for your time and directions in advance
Last edit: 14 Feb 2021 12:04 by robertspark.

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

More
13 Feb 2021 23:18 #198750 by rodw
In your ini file, did you follow this advice?
[AXIS_X]
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 700
STEPGEN_MAXACCEL = 2000

That has caused following error issues for me.
The following user(s) said Thank You: robertspark

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

More
13 Feb 2021 23:46 - 14 Feb 2021 00:11 #198755 by PCW
Do you have IRQ coalescing disabled?
(man hm2_eth)
This is important when using Intel Ethernet chips on the host
(and wg82583v's are Intel chips)

You can check whether you have successfully disabled IRQ coalescing with

ethtool -c DEVNAME

Where DEVNAME is the name of your real time Ethernet interface
(I suggest doing to verify this as errors in the interfaces file are simply ignored)

Also are you running both cards at once? this requires special hal file setup
using read-request to allow overlapping response times rather than adding them
Last edit: 14 Feb 2021 00:11 by PCW.
The following user(s) said Thank You: robertspark, Sadmeatball

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

More
14 Feb 2021 00:01 #198760 by tommylight
Check the cooler temperature while LinuxCNC is running, it might get to hot causing the processor to throttle down.
On that note, does the error occur at the start or after a while ?
Installing some type of temp monitoring will help eliminate temperature as a cause.
Did you also disable the C states in BIOS ?
The following user(s) said Thank You: robertspark

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

More
14 Feb 2021 00:09 #198762 by rodw

Do you have IRQ coalescing disabled?
(man hm2_eth)
This is important when using Intel Ethernet chips on the host
(and wg82583v's are Intel chips)


I had to look hard to find that in the man page
   Configure network with static address
       Add these lines to the file /etc/network/interfaces to  configure  eth1
       with a static address:

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

There is no discussion about intel NIC's I wonder if the docs could be improved?
The following user(s) said Thank You: robertspark

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

More
14 Feb 2021 00:19 #198764 by PCW
It applies to a number of chips but Inlel is by far the most common
chip that has a driver with this option

I guess the manual could mention that intel MACs requires this option

(Realteks driver does not have this option)
The following user(s) said Thank You: rodw, robertspark

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

More
14 Feb 2021 11:54 #198792 by robertspark

In your ini file, did you follow this advice?
[AXIS_X]
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 700
STEPGEN_MAXACCEL = 2000

That has caused following error issues for me.


Yes, they are +25% greater, not using Backlash comp.

______________________________________________________________________

Do you have IRQ coalescing disabled?
(man hm2_eth)
This is important when using Intel Ethernet chips on the host
(and wg82583v's are Intel chips)

You can check whether you have successfully disabled IRQ coalescing with

ethtool -c DEVNAME

Where DEVNAME is the name of your real time Ethernet interface
(I suggest doing to verify this as errors in the interfaces file are simply ignored)

Also are you running both cards at once? this requires special hal file setup
using read-request to allow overlapping response times rather than adding them


Can you elaborate on the use of 2x NICs / ethernet ports please?

My plan was to use on for the 7i76E (plasma, mill, router [5xateppers]), and the 2nd for the 7i92H+7i76 (lathe [2x steppers + a step & dir servo spindle])
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

auto enp2s0
iface enp2s0 inet static
address 10.10.10.100
hardware-irq-coalesce-rx-usecs 0

auto enp3s0
iface enp3s0 inet static
address 10.10.10.95
hardware-irq-coalesce-rx-usecs 0
rob@RobsCNC:~$ sudo ethtool -c enp3s0
Coalesce parameters for enp3s0:
Adaptive RX: off  TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0

rx-usecs: 0
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0

tx-usecs: 0
tx-frames: 0
tx-usecs-irq: 0
tx-frames-irq: 0

rx-usecs-low: 0
rx-frame-low: 0
tx-usecs-low: 0
tx-frame-low: 0

rx-usecs-high: 0
rx-frame-high: 0
tx-usecs-high: 0
tx-frame-high: 0

rob@RobsCNC:~$ sudo ethtool -c enp2s0
Coalesce parameters for enp2s0:
Adaptive RX: off  TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0

rx-usecs: 0
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0

tx-usecs: 0
tx-frames: 0
tx-usecs-irq: 0
tx-frames-irq: 0

rx-usecs-low: 0
rx-frame-low: 0
tx-usecs-low: 0
tx-frame-low: 0

rx-usecs-high: 0
rx-frame-high: 0
tx-usecs-high: 0
tx-frame-high: 0

________________________________________________________________________________________________

Check the cooler temperature while LinuxCNC is running, it might get to hot causing the processor to throttle down.
On that note, does the error occur at the start or after a while ?
Installing some type of temp monitoring will help eliminate temperature as a cause.
Did you also disable the C states in BIOS ?


yes c-states are disabled (I've taken a load of photos, ill upload them later when I've got them all in a PDF off my phone)

Thanks very much all for the comments / suggestions and pointers.

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

More
14 Feb 2021 12:02 - 14 Feb 2021 12:03 #198794 by robertspark
Oh, I've monitored the temperature and the fanless PC is fine (it gets warm after a while [many hours])

The error comes up at boot time onwards, I don't believe it is temperature related / throttling related.
Last edit: 14 Feb 2021 12:03 by robertspark.

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

More
14 Feb 2021 12:24 #198797 by robertspark
rob@RobsCNC:~$ lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
Address sizes:       39 bits physical, 48 bits virtual
CPU(s):              2
On-line CPU(s) list: 0,1
Thread(s) per core:  1
Core(s) per socket:  2
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               61
Model name:          Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
Stepping:            4
CPU MHz:             2394.536
CPU max MHz:         2300.0000
CPU min MHz:         500.0000
BogoMIPS:            4789.07
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            4096K
NUMA node0 CPU(s):   0,1
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap intel_pt xsaveopt dtherm arat pln pts md_clear flush_l1d

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

More
14 Feb 2021 12:33 #198799 by robertspark
any merit in messing around with the cpu govenor scaling (sure something similar exists in debian) wiki.archlinux.org/index.php/CPU_frequen...#Switching_threshold

I am running debian buster, I upgraded the kernel to the backports:
rob@RobsCNC:~$ uname -a
Linux RobsCNC 5.9.0-0.bpo.5-rt-amd64 #1 SMP PREEMPT_RT Debian 5.9.15-1~bpo10+1 (2020-12-31) x86_64 GNU/Linux


The Max jitter got worse 69937

I know there have been some issues listed with 5.9 rt kernel, but I thought it as worth a shot given I'm just learning what works and what doesn't plus trying to get a bit conversant with linux and terminal etc

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

Time to create page: 0.171 seconds
Powered by Kunena Forum