Results of latency test, list of computers tested for use with LinuxCNC

More
27 Sep 2020 21:02 #184052 by tommylight
Multi core support can be left on, at least i always do.
Multithreading is always off.
The following user(s) said Thank You: seuchato

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

More
27 Sep 2020 21:13 #184056 by txtrone
Ok, I will adjust that as well and run the script again.
The following user(s) said Thank You: tommylight

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

More
28 Sep 2020 01:27 #184089 by JohnnyCNC
isolcpus=0 gave the worst results, no isolcpus was next, and isolcpus=1 was best.
LinuxCNC pc tests, version 20200922, started 27.09.2020 19:01:43
********************************************************************************
General info:
ECS,  BAT-I
Bios version 5.6.5, dated 01/18/2016
Chipset: Harddisk is non-rotational, ie. SSD
The amount of swap currently used is 0
================================================================================
CPU related data:
model name	: Intel(R) Celeron(R) CPU  J1800  @ 2.41GHz
cpu cores	: 2
stepping	: 8
cache size	: 1024 KB
================================================================================
RAM related data:
Maximum Capacity: 8 GB
Maximum Voltage: 1.5 V
Size: 8192 MB
================================================================================
GPU related data:
product: Atom Processor Z36xxx/Z37xxx Series Graphics & Display
configuration: driver=i915 latency=0
================================================================================
Parallel port related data:
number of parallel ports is 1
parport0: PC-style at 0x378, irq 5 [PCSPP,TRISTATE]
================================================================================
Os related data:
PRETTY_NAME="Linux Mint 20"
Windowmanager = 
================================================================================
Kernel related data:
Kernel 4.9.0-13-rt-amd64
GRUB_CMDLINE_LINUX_DEFAULT="quiet isolcpus=1 splash"
Cpu idle driver: intel_idle
================================================================================
Kernel modules data:
Check if pcspkr is loaded: No, which is good!
Check if snd modules are loaded: No, which is good!
================================================================================
Keyboard & Mouse related data:
Number of mice: 1
Mouse 0 : Logitech M215 2nd Gen
Mice  attached to USB:
Keyboards attached to USB:
================================================================================
LinuxCNC related data:
LinuxCNC version is: 2.8.0.45.g6319aa042
================================================================================
Preparing for latency test:
Started glxgears No. 1, 2, 3, 4, 5
..........
Started firefox with 'https://vimeo.com/150574260', WID 73400323
================================================================================
Command for latency test is:
su john -c  "latency-histogram --nobase  --sbinsize 1000 --nox 2>&1 | tee -a 1601247687.lat &"

Latency testing loop started Sun 27 Sep 2020 07:02:07 PM EDT, 
should end after Sun 27 Sep 2020 09:02:07 PM EDT

================================================================================
Swap useage: prerun: 0, running: 0

================================================================================
CPU core temperatures:
Core 0: Tmin: 31.0°C, Tmax: 44.0°C, (high = +105.0°C, crit = +105.0°C)
Core 1: Tmin: 31.0°C, Tmax: 44.0°C, (high = +105.0°C, crit = +105.0°C)
================================================================================
last latency data is as follows:.
 7203 secs  servo min: -64.200 uS max:  82.800 uS sdev:   4.300 uS
 7204 secs  servo min: -64.200 uS max:  82.800 uS sdev:   4.300 uS
The following user(s) said Thank You: seuchato

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

More
28 Sep 2020 06:23 #184113 by seuchato

Multi core support can be left on, at least i always do.
Multithreading is always off.


Yep, I saw more or less no effect in turning off multicores, however turing off multithreading impaired latencies.

Later this week, i'll put together my "best" bios settings for two or three pc's I tend to use. Maybe this can help others or at least serve as a source of inspiration.

greez
chris

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

More
28 Sep 2020 06:24 #184114 by seuchato

isolcpus=0 gave the worst results, no isolcpus was next, and isolcpus=1 was best.


Will play with that on my T500.

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

More
28 Sep 2020 06:49 #184115 by seuchato

Have 2 kernels you might want to give a go. These are the ones used on the Mint ISOs. The header & libc-dev packages are in the same dirs as linux-image-xxx.
The -rt46 has efi=runtime embedded in the kernel image but should not affect non UEFI systems.

cnc.beaglebrainz.net/mintcnc/pool/2.8-rt...t44-lcnc-1_amd64.deb

cnc.beaglebrainz.net/mintcnc/pool/2.8-rt...t46-lcnc-1_amd64.deb


BeagleBrainz:

This is from my "reference", a Dell 980 ( see here , but with Xfce4 and install off stock iso, this machine has bios A18, while then it was A04). I have audio disabled in bios, however with both of your kernels I get this:
uname -a
Linux cnc0 4.19.106-rt44-lcnc #1 SMP PREEMPT RT Thu Mar 5 00:02:34 AEDT 2020 x86_64 GNU/Linux
root@cnc0:~# lsmod | grep snd
snd_pcsp               16384  2
snd_pcm                98304  1 snd_pcsp
snd_timer              32768  1 snd_pcm
snd                    81920  7 snd_timer,snd_pcsp,snd_pcm
soundcore              16384  1 snd

When running the script, I even got some garbled audio output on the internal speaker! These very modules where also loaded using the

If running a stock buster kernel (ie.: 4.19.0-11-rt-amd64) and nothing else changed, there are no snd modules!

comparison of latencies of the various kernels I have:
cat *.hw | grep -E "4\.19\.|secs"
 Kernel 4.19.0-9-rt-amd64
 7200 secs   base min: -34.600 uS max:  33.300 uS sdev:   0.800 uS
 7200 secs  servo min: -17.500 uS max:  18.300 uS sdev:   1.100 uS
Kernel 4.19.0-10-rt-amd64
 7203 secs   base min: -32.800 uS max:  33.100 uS sdev:   1.000 uS
 7203 secs  servo min: -29.300 uS max:  30.100 uS sdev:   2.500 uS
Kernel 4.19.0-11-rt-amd64
 7199 secs  servo min: -27.500 uS max:  31.100 uS sdev:   1.200 uS
 7201 secs   base min: -29.200 uS max:  29.200 uS sdev:   0.800 uS
Kernel 4.19.106-rt44-lcnc
  245 secs   base min: -40.100 uS max:  52.800 uS sdev:   0.900 uS
  245 secs  servo min: -39.100 uS max:  37.900 uS sdev:   1.500 uS
 (script repetitively stopped early due to real time delay)
Kernel 4.19.106-rt46-lcnc
   15 secs   base min: -44.400 uS max:  43.300 uS sdev:   1.500 uS
   15 secs  servo min:  -7.300 uS max:   7.200 uS sdev:   1.100 uS
  (script repetitively stopped early due to real time delay)

I'll try your kernels on my mint ssd later today and report the results afterwards.

So: How come, these modules get loaded?

Greez
chris

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

More
28 Sep 2020 07:45 - 28 Sep 2020 08:14 #184117 by BeagleBrainz
I did a search trying to find an answer to sound modules being loaded when disabled in the BIOS, every answer pointed at checking the BIOS. I really can't explain it.

Did 4 tests
1: VBox with sound device diasbled, Mint 19.3 my kernel no sound modules loaded, Host has sound modules loaded
2: Odroid H2+ sound disabled no sound modules loaded
3: Asrock J3355B sound disabled no sound modules loaded
4: Lenovo ThinkStation S20 sound disabled in BIOS but with Quadro 2000, sound modules loaded due to GPU having HDMI.
No option to disable sound on my T530, so was unable to test.

dmesg | grep sound for the S20 I really don't think there would be much difference between 19.2 & 19.3 in latency.
rmurphy@ThinkStation-S20:~$ dmesg | grep sound
[    7.710692] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:03.0/0000:02:00.1/sound/card0/input8
[    7.719026] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:03.0/0000:02:00.1/sound/card0/input9
[    7.727323] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:03.0/0000:02:00.1/sound/card0/input10
[    7.735811] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:03.0/0000:02:00.1/sound/card0/input11

All other examples have have no output from grep, even when using the -i switch for grep.

I use my kernel on the machine controlling my mill and even after a full days usage never had an issues relating to latency. Still to hook up the Odroid as I don't want to mess around with things too much until I have the DYN4 & AC sevo dialled in for the spindle.
Actually I haven't had any feedback due to latency issues from other users, the first Mint ISO's with the 4.19.106-rt44-lcnc kernel came out around April.

Quick run of the test on the S20. I really don't think there would be much difference between 19.2 & 19.3 in latency. Along with the T530 is my daily driver. Yeah I use the RT kernels daily (99% exclusively), both machines are on 24/7.
LinuxCNC pc tests, version 20200922, started 28.09.2020 17:41:52
********************************************************************************
General info:
LENOVO,  4157CTO
Bios version 60KT45AUS, dated 03/30/2012
Chipset: Intel Corporation 5520/5500/X58 
Harddisk is non-rotational, ie. SSD
The amount of swap currently used is 0
================================================================================
CPU related data:
model name	: Intel(R) Xeon(R) CPU           W3550  @ 3.07GHz
cpu cores	: 4
stepping	: 5
cache size	: 8192 KB
================================================================================
RAM related data:
Maximum Capacity: 192 GB
Size: 4096 MB
Size: 4096 MB
Size: 4096 MB
Size: 4096 MB
Size: 4096 MB
Size: 4096 MB
================================================================================
GPU related data:
product: GF106GL [Quadro 2000]
configuration: driver=nouveau latency=0
================================================================================
Parallel port related data:
number of parallel ports is 0
================================================================================
Os related data:
PRETTY_NAME="Linux Mint 19.2"
Windowmanager = 
================================================================================
Kernel related data:
Kernel 4.19.106-rt46-lcnc
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
Cpu idle driver: intel_idle
================================================================================
Kernel modules data:
Check if pcspkr is loaded: No, which is good!
Check if snd modules are loaded: Yes, may cause bigger latency.
can probably be disabled in bios
================================================================================
Keyboard & Mouse related data:
Number of mice: 1
Mouse 0 : Logitech USB Receiver Mouse
Mice  attached to USB:
Keyboards attached to USB:
================================================================================
LinuxCNC related data:
LinuxCNC version is: 2.8.0.44.gad1491d89
================================================================================
Preparing for latency test:
Started glxgears No. 1, 2, 3, 4, 5
..........
Started firefox with 'https://vimeo.com/150574260', WID 60818346
================================================================================
Command for latency test is:
su rmurphy -c  "latency-histogram --nobase  --sbinsize 1000 --nox 2>&1 | tee -a 1601278900.lat &"

Latency testing loop started Mon 28 Sep 17:42:07 AEST 2020, 
should end after Mon 28 Sep 19:42:07 AEST 2020

Manual termination requested at 28.09.2020 17:42:34 

================================================================================
Swap useage: prerun: 0, running: 0

================================================================================
CPU core temperatures:
Core 0: Tmin: 43.0°C, Tmax: 46.0°C, (high = +80.0°C, crit = +100.0°C)
Core 1: Tmin: 35.0°C, Tmax: 40.0°C, (high = +80.0°C, crit = +100.0°C)
Core 2: Tmin: 41.0°C, Tmax: 45.0°C, (high = +80.0°C, crit = +100.0°C)
Core 3: Tmin: 37.0°C, Tmax: 41.0°C, (high = +80.0°C, crit = +100.0°C)
================================================================================
last latency data is as follows:.
   27 secs  servo min: -11.900 uS max:  13.600 uS sdev:   1.600 uS
   28 secs  servo min: -11.900 uS max:  13.600 uS sdev:   1.600 uS
Last edit: 28 Sep 2020 08:14 by BeagleBrainz.

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

More
28 Sep 2020 08:36 #184121 by seuchato
Beagle,
I'll try circumvent the loading of said snd modules using a fake install (evrything fake nowadays, even installs :-])

greez
chris

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

More
28 Sep 2020 09:03 #184126 by BeagleBrainz
You could also add the modules to a blacklist, which is the usual way.


The thing is the kernel is detecting the sound card and the loading of the modules is not an error.
what does
dmesg | grep -i sound
output ?

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

More
28 Sep 2020 10:20 #184128 by seuchato

You could also add the modules to a blacklist, which is the usual way.


The thing is the kernel is detecting the sound card and the loading of the modules is not an error.
what does
dmesg | grep -i sound
output ?


Will do that when the current test is finished.

Here is a scriptlet to prevent loading of sound modules at boot time:
#! /bin/bash

if [ "-$(lsmod | grep snd)-" != "--" ] ; then 

  echo currently these \"snd\" modules are loaded: $(lsmod | grep snd | awk '{print $1}')

  for i in $(lsmod | grep snd | awk '{print $1}' | tr  '\n' ' ') 
  do
    echo "install $i /bin/false" >> /etc/modprobe.d/snd.conf
  done

  echo " reboot now and check usung \"lsmod | grep snd\""
else
  echo " There are no \"snd\" modules loaded."
fi

save ie. as "block-snd-modules" and run "sudo ./block-snd-modules", then reboot.

hope this will be useful for others too.

greez
chris

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

Time to create page: 0.378 seconds
Powered by Kunena Forum