Error while Running Linuxcnc

More
21 Sep 2024 19:57 #310567 by PCW
Replied by PCW on topic Error while Running Linuxcnc
What CPU is used?

RPI 4 will work if you force turbo mode and use isolcpus 1,2,3
(but 2G will be an issue if you have fancy backplots)

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

More
22 Sep 2024 03:31 #310583 by rajsekhar
CPU is as follows:
==================================================
raycnc1@debian:~/Desktop$ lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         39 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  2
  On-line CPU(s) list:   0,1
Vendor ID:               GenuineIntel
  Model name:            Intel(R) Core(TM) i3-6100T CPU @ 3.20GHz
    CPU family:          6
    Model:               94
    Thread(s) per core:  1
    Core(s) per socket:  2
    Socket(s):           1
    Stepping:            3
    CPU(s) scaling MHz:  100%
    CPU max MHz:         3200.0000
    CPU min MHz:         800.0000
    BogoMIPS:            6399.96
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mc
                         a cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss
                         ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art
                          arch_perfmon pebs bts rep_good nopl xtopology nonstop_
                         tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cp
                         l vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1
                          sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsav
                         e avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault
                          invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnm
                         i flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1
                          avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflus
                         hopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ara
                         t pln pts hwp hwp_notify hwp_act_window hwp_epp md_clea
                         r flush_l1d arch_capabilities
Virtualization features:
  Virtualization:        VT-x
Caches (sum of all):     
  L1d:                   64 KiB (2 instances)
  L1i:                   64 KiB (2 instances)
  L2:                    512 KiB (2 instances)
  L3:                    3 MiB (1 instance)
NUMA:                    
  NUMA node(s):          1
  NUMA node0 CPU(s):     0,1
Vulnerabilities:         
  Gather data sampling:  Vulnerable: No microcode
  Itlb multihit:         KVM: Mitigation: VMX disabled
  L1tf:                  Mitigation; PTE Inversion; VMX conditional cache flushe
                         s, SMT disabled
  Mds:                   Mitigation; Clear CPU buffers; SMT disabled
  Meltdown:              Mitigation; PTI
  Mmio stale data:       Mitigation; Clear CPU buffers; SMT disabled
  Retbleed:              Mitigation; IBRS
  Spec rstack overflow:  Not affected
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer
                          sanitization
  Spectre v2:            Mitigation; IBRS, IBPB conditional, RSB filling, PBRSB-
                         eIBRS Not affected
  Srbds:                 Mitigation; Microcode
  Tsx async abort:       Not affected
raycnc1@debian:~/Desktop$
=======================================================
I did some  test as follows:
=======================================================
raycnc1@debian:~/Desktop$ lshw -class network
bash: lshw: command not found

raycnc1@debian:~/Desktop$ lspci | egrep -i 'network|ethernet'
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 16)


raycnc1@debian:~/Desktop$ ping -i .2 -c 4 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.118 ms
64 bytes from 10.10.10.10: icmp_seq=2 ttl=64 time=0.065 ms
64 bytes from 10.10.10.10: icmp_seq=3 ttl=64 time=0.063 ms
64 bytes from 10.10.10.10: icmp_seq=4 ttl=64 time=0.063 ms

--- 10.10.10.10 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 609ms
rtt min/avg/max/mdev = 0.063/0.077/0.118/0.023 ms
raycnc1@debian:~/Desktop$ sudo chrt 99 ping -i .001 -q 10.10.10.10
[sudo] password for raycnc1:
PING 10.10.10.10 (10.10.10.10) 56(84) bytes of data.

--- 10.10.10.10 ping statistics ---
246632 packets transmitted, 246631 received, 0.000405462% packet loss, time 248878ms
rtt min/avg/max/mdev = 0.046/0.049/0.102/0.003 ms
^C
raycnc1@debian:~/Desktop$

raycnc1@debian:~/Desktop$ ping 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.078 ms
64 bytes from 10.10.10.10: icmp_seq=2 ttl=64 time=0.078 ms
64 bytes from 10.10.10.10: icmp_seq=3 ttl=64 time=0.063 ms
64 bytes from 10.10.10.10: icmp_seq=4 ttl=64 time=0.070 ms
64 bytes from 10.10.10.10: icmp_seq=5 ttl=64 time=0.063 ms
64 bytes from 10.10.10.10: icmp_seq=6 ttl=64 time=0.073 ms
64 bytes from 10.10.10.10: icmp_seq=7 ttl=64 time=0.065 ms
64 bytes from 10.10.10.10: icmp_seq=8 ttl=64 time=0.063 ms
64 bytes from 10.10.10.10: icmp_seq=9 ttl=64 time=0.063 ms
64 bytes from 10.10.10.10: icmp_seq=10 ttl=64 time=0.063 ms
^C
--- 10.10.10.10 ping statistics ---
338 packets transmitted, 338 received, 0% packet loss, time 345086ms
rtt min/avg/max/mdev = 0.062/0.066/0.152/0.007 ms
raycnc1@debian:~/Desktop$

============================================================


Please confirm whether this CPU can be used or not.

I need a reliable performance and that is the ultimate goal.

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

More
25 Sep 2024 12:47 #310766 by rajsekhar
One confusion I could not clear..My CPU is Intel i3 6100T.

www.intel.com/content/www/us/en/products.../specifications.html

As per this link, it has 2 core. The "lscpu" result is just in above post.

But in latency histogram, core=4. (attached)

Why??
Attachments:

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

More
25 Sep 2024 12:57 #310767 by Todd Zuercher
Do you have Hyper-threading enabled? Hyper-threading creates two virtual cores for each real core, so that a 2 core CPU is seen as 4. Hyperthreading gives poor latency results with real time, turn it off or disable it in your bios.
The following user(s) said Thank You: rajsekhar

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

More
25 Sep 2024 16:38 #310790 by rajsekhar
Yes, hyper threading was on. I disabled it. Also turbo boost was on, now disabled. But there is very negligible improvement in latency.

However, should I set the IRQ affinity to CPU=1? It is a realtek network adapter inbuilt in motherboard.

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

More
25 Sep 2024 16:41 #310791 by PCW
Replied by PCW on topic Error while Running Linuxcnc
Turbo boost by itself can cause huge latency spikes

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

More
25 Sep 2024 19:33 #310794 by rodw
Replied by rodw on topic Error while Running Linuxcnc
You need to install the R8168_dkms driver for your NIC. Also set the CPU affinity per a script on this forum. There are also some settings to deal with energy efficient Ethernet. I cover it all in my help doc
docs.google.com/document/d/1jeV_4VKzVmOI...diY/edit?usp=sharing

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

More
26 Sep 2024 13:40 #310827 by rajsekhar
I tries ip-a in terminal and result below:
=========================================================
raycnc1@debian:~/Desktop$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 18:c0:4d:78:76:3b brd ff:ff:ff:ff:ff:ff
    inet 10.10.10.11/24 brd 10.10.10.255 scope global noprefixroute enp4s0
       valid_lft forever preferred_lft forever
3: wlx20e616011575: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 20:e6:16:01:15:75 brd ff:ff:ff:ff:ff:ff
    inet 192.168.38.167/24 brd 192.168.38.255 scope global dynamic noprefixroute wlx20e616011575
       valid_lft 2357sec preferred_lft 2357sec
    inet6 2409:4060:29a:55eb:f28:5760:799e:7353/64 scope global dynamic noprefixroute
       valid_lft 6913sec preferred_lft 6913sec
    inet6 fe80::c85e:7991:888d:a126/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
raycnc1@debian:~/Desktop$ ethtool enp4s0
bash: ethtool: command not found
raycnc1@debian:~/Desktop$
==========================================================

But ethool command does not work.

Note: My computer have wireless keyboard+mouse and one wifi router in usb port.




 

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

More
26 Sep 2024 13:57 #310831 by PCW
Replied by PCW on topic Error while Running Linuxcnc
You might try "locate ethtool" ethtool may be in /sbin on Debian.
_But_ if you have Realtek Ethernet hardware, Ethtool is not needed.
What _is_ required for Realtek hardware  is to install the 8168 DKMS
driver as rodw mentioned.

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

More
26 Sep 2024 15:12 #310837 by rajsekhar
The locate ethtool result as follows:
==============================================================
raycnc1@debian:~/Desktop$ locate ethtool
/usr/include/linux/ethtool.h
/usr/include/linux/ethtool_netlink.h
/usr/src/linux-headers-6.1.0-18-common/include/linux/ethtool.h
/usr/src/linux-headers-6.1.0-18-common/include/linux/ethtool_netlink.h
/usr/src/linux-headers-6.1.0-18-common/include/uapi/linux/ethtool.h
/usr/src/linux-headers-6.1.0-18-common/include/uapi/linux/ethtool_netlink.h
/usr/src/linux-headers-6.1.0-18-common-rt/include/linux/ethtool.h
/usr/src/linux-headers-6.1.0-18-common-rt/include/linux/ethtool_netlink.h
/usr/src/linux-headers-6.1.0-18-common-rt/include/uapi/linux/ethtool.h
/usr/src/linux-headers-6.1.0-18-common-rt/include/uapi/linux/ethtool_netlink.h
raycnc1@debian:~/Desktop$

=================================================================

Now as per my last post above today (ip a result) , I assumed that my ethernet card is "enp4s0". I am not sure whether I am right, if wrong , please reply.
And I set the IRQ affinity as per this post of course:
forum.linuxcnc.org/38-general-linuxcnc-q...ead-and-irq-affinity

The "journalct1 -b -u irqbalance.service" resulted some command error.

But "watch -n1 -d cat /proc/interrupts" resulted output which is attached in photo (as irq number changes continuously, not possible to copy/paste).

In that result CPU0 is handling all the Interrupts while running LCNC(182008 in exact in photo) for "enp4s0". Is that correct? I was expecting exactly opposite, interrupts to be in CPU1. I have done isolcpu=1. histogram attached.
 
Attachments:

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

Moderators: PCWjmelson
Time to create page: 0.090 seconds
Powered by Kunena Forum