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

More
5 years 9 months ago - 5 years 9 months ago #193787 by MNJoe
I really have no idea how this looks or suggestions to improve it. Took me long enough just to get the file unzipped and figure out how to run it.
Code:
LinuxCNC pc tests, version 20200930, started 01.01.2021 17:34:59 ******************************************************************************** General info: Dell Inc., OptiPlex 9020 Bios version A05, dated 12/05/2013 Chipset: Intel Corporation 8 Series/C220 Series Harddisk is non-rotational, ie. SSD The amount of swap currently used is 0 ================================================================================ CPU related data: model name : Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz cpu cores : 4 stepping : 3 cache size : 6144 KB ================================================================================ RAM related data: Maximum Capacity: 32 GB Size: No Module Installed Size: 4096 MB Size: No Module Installed Size: 4096 MB ================================================================================ GPU related data: product: Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller configuration: driver=i915 latency=0 ================================================================================ Parallel port related data: number of parallel ports is 0 ================================================================================ Os and desktop related data: PRETTY_NAME="Debian GNU/Linux 10 (buster)" Should the info below not match with your machine, kindly post the output of pstree here, including a brief desciption of your desktop environment, window manager and display manager. Tia https://forum.linuxcnc.org/18-computer/39370-script-for-automated-testing-of-computer-latency Desktop environment : xfce4 Windowmanager : Xfwm4 Displaymanager : lightdm ================================================================================ Kernel related data: Kernel 4.19.0-11-rt-amd64 GRUB_CMDLINE_LINUX_DEFAULT="quiet" Cpu idle driver: intel_idle ================================================================================ Kernel modules data: Check if pcspkr is loaded: Yes, may cause bigger latency. can be eliminated using: sudo echo "install pcspkr /bin/true" >/etc/modprobe.d/pcspkr.conf Check if snd modules are loaded: Yes, may cause bigger latency. can probably be disabled in bios, alternatively, you can run "./block-snd-modules" which has just now been created for your convenience. ================================================================================ Keyboard & Mouse related data: Number of mice: 1 Mouse 0 : No brand Combo Free KVM Mouse Mice attached to USB: Keyboards attached to USB: ================================================================================ LinuxCNC related data: LinuxCNC version is: 2.8.1 ================================================================================ Preparing for latency test: Started glxgears No. 1, 2, 3, 4, 5 .......... Started firefox with 'https://vimeo.com/150574260', WID 46137347 ================================================================================ Command for latency test is: su MNJoe -c "latency-histogram --nobase --sbinsize 1000 --nox 2>&1 | tee -a 1609544065.lat &" Latency testing loop started Fri 01 Jan 2021 05:35:12 PM CST, should end after Fri 01 Jan 2021 07:35:12 PM CST ================================================================================ Swap useage: prerun: 0, running: 0 ================================================================================ CPU core temperatures: Core 0: Tmin: 46.0°C, Tmax: 74.0°C, (high = +80.0°C, crit = +100.0°C) Core 1: Tmin: 43.0°C, Tmax: 75.0°C, (high = +80.0°C, crit = +100.0°C) Core 2: Tmin: 41.0°C, Tmax: 74.0°C, (high = +80.0°C, crit = +100.0°C) Core 3: Tmin: 41.0°C, Tmax: 72.0°C, (high = +80.0°C, crit = +100.0°C) ================================================================================ last latency data is as follows:. 7200 secs servo min: -65.300 uS max: 65.600 uS sdev: 2.700 uS 7201 secs servo min: -65.300 uS max: 65.600 uS sdev: 2.700 uS

Code:
This is from the 2nd run with Sound disabled... ================================================================================ Command for latency test is: su MNJoe -c "latency-histogram --nobase --sbinsize 1000 --nox 2>&1 | tee -a 1609554921.lat &" Latency testing loop started Fri 01 Jan 2021 08:35:39 PM CST, should end after Fri 01 Jan 2021 10:35:39 PM CST ================================================================================ Swap useage: prerun: 0, running: 0 ================================================================================ CPU core temperatures: Core 0: Tmin: 41.0°C, Tmax: 74.0°C, (high = +80.0°C, crit = +100.0°C) Core 1: Tmin: 39.0°C, Tmax: 74.0°C, (high = +80.0°C, crit = +100.0°C) Core 2: Tmin: 38.0°C, Tmax: 73.0°C, (high = +80.0°C, crit = +100.0°C) Core 3: Tmin: 38.0°C, Tmax: 74.0°C, (high = +80.0°C, crit = +100.0°C) ================================================================================ last latency data is as follows:. 7203 secs servo min: -38.200 uS max: 43.500 uS sdev: 2.200 uS 7203 secs servo min: -38.200 uS max: 43.500 uS sdev: 2.200 uS
Last edit: 5 years 9 months ago by MNJoe. Reason: Added More information
The following user(s) said Thank You: seuchato

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

More
5 years 9 months ago - 5 years 9 months ago #193790 by MNJoe
I have an AMD Radeon Graphics card that I removed because it seemed under the basic Latency tests my numbers were worse. Any thoughts on why that would be? I did run the script to shut off my sound so I'm rerunning the test now with the sound shutdown.

Below I've added the changes from the above entry with that Video Card/GPU installed -
From Dell Optiplex 9020...
Code:
~~~~~~~~~~~~~~~~~~~~~ ================================================================================ GPU related data: product: Oland [Radeon HD 8570 / R7 240/340 OEM] configuration: driver=radeon latency=0 ================================================================================ ~~~~~~~~~~~~~~~~~~~~~ ================================================================================ Command for latency test is: su MNJoe -c "latency-histogram --nobase --sbinsize 1000 --nox 2>&1 | tee -a 1609567842.lat &" Latency testing loop started Sat 02 Jan 2021 12:11:02 AM CST, should end after Sat 02 Jan 2021 02:11:02 AM CST ================================================================================ Swap useage: prerun: 0, running: 0 ================================================================================ CPU core temperatures: Core 0: Tmin: 41.0°C, Tmax: 74.0°C, (high = +80.0°C, crit = +100.0°C) Core 1: Tmin: 39.0°C, Tmax: 75.0°C, (high = +80.0°C, crit = +100.0°C) Core 2: Tmin: 37.0°C, Tmax: 73.0°C, (high = +80.0°C, crit = +100.0°C) Core 3: Tmin: 38.0°C, Tmax: 73.0°C, (high = +80.0°C, crit = +100.0°C) ================================================================================ last latency data is as follows:. 7204 secs servo min: -45.200 uS max: 49.300 uS sdev: 1.900 uS 7204 secs servo min: -45.200 uS max: 49.300 uS sdev: 1.900 uS
Last edit: 5 years 9 months ago by MNJoe. Reason: Added Details
The following user(s) said Thank You: seuchato

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

More
5 years 9 months ago - 5 years 9 months ago #193813 by seuchato
MNJoe

The values of latency you have, should be fine for servo, ie. Mesa based stuff. I'd set the value in LinuxCNC to 120 -130% of the obtained latency data (courtesy Tommylight).
I have seen some Radeon GPU's doing bad stuff to latency too (see here for example). I would assume, you can get latency down, but first and since you do not have a parallel port, I'd test your PC as it is set up now.

Hints for bringing latency further down:
  • Bios: disable everything that smells like hyper threading, power saving. Also disable every option / device, that you do not need. You could try disabling multicore too, but see below
  • Play wit GRUB_CMDLINE_LINUX_DEFAULT="quiet", add "isolcpus=x,y" (where x,y can be anything like 0,1/2,3/0/1/2/3, the parameter hides the denominated cores from the os, wheras disabling multicore does not give an option to choose which one(s) you want and which one(s) you don't), "idle=poll" and many more possibilities.

Just change one thing at a time, note down the resulls in a spreadsheat and sort them versus latencies obtained (I do it this way). There are chances, that a combination of the parameters to play with will give optimal results. You may or may not see a correlation in improvement. And finally: as BeagleBrainz pointed out earlier: it is not worth to go for the last uS of improvement. If you repeat the tests, you will see some variation. What really counts is that your system returns consistent reliable values at a >reasonable< low level, not the very lowest level. Tommylight would probably add: "do some real world testing by running the PC on real data, just disconnected from the motors for hours. If there are no " real time delay" messages, you should be fine". I second that.

hth
chris
Last edit: 5 years 9 months ago by seuchato. Reason: typos
The following user(s) said Thank You: tommylight

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

More
5 years 9 months ago #193815 by MNJoe
Thanks for the quick reply - I have a PCIe Parallel port coming just trying to get my arms around this before its here. I'll give a shot at just disabling the other cores once to get a perspective then track down how to edit the GRUB file for refinement. I did add the values for the full script run with the Video Card installed as well above.
The following user(s) said Thank You: seuchato

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

More
5 years 9 months ago #193816 by seuchato
I delete everything of your post that I would not comment:

Project_Hopeless wrote: Dell OptiPlex 9010 i5-3570 CPU 3.40GHz

Linux Buster:

Code:
LinuxCNC pc tests, version 20200930, started 28.12.2020 16:43:54 ******************************************************************************** General info: Dell Inc., OptiPlex 9010 Bios version A13, dated 03/27/2013 Chipset: Intel Corporation 7 Series/C216 Harddisk is rotational The amount of swap currently used is 0 ... ================================================================================ Os and desktop related data: PRETTY_NAME="Debian GNU/Linux 10 (buster)" ... Desktop environment : xfce4 Windowmanager : Xfwm4 Displaymanager : lightdm ================================================================================ Kernel related data: Kernel 4.19.0-11-rt-amd64 GRUB_CMDLINE_LINUX_DEFAULT="quiet" Cpu idle driver: intel_idle ================================================================================ Kernel modules data: Check if pcspkr is loaded: Yes, may cause bigger latency. can be eliminated using: sudo echo "install pcspkr /bin/true" >/etc/modprobe.d/pcspkr.conf Check if snd modules are loaded: No, which is good! ... ================================================================================ last latency data is as follows:. 7199 secs servo min: -75.700 uS max: 74.300 uS sdev: 2.900 uS 7199 secs servo min: -75.700 uS max: 74.300 uS sdev: 2.900 uS


Linux Mint:
Code:
LinuxCNC pc tests, version 20200930, started 28.12.2020 13:48:40 ******************************************************************************** ... ================================================================================ Os and desktop related data: PRETTY_NAME="Linux Mint 19.2" ... Desktop environment : gnome Windowmanager : Metacity (Marco) Displaymanager : lightdm ================================================================================ Kernel related data: Kernel 4.16.12-rt5-kona-rt 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: No, which is good! ... ================================================================================ last latency data is as follows:. 7202 secs servo min: -96.200 uS max: 108.000 uS sdev: 6.100 uS 7203 secs servo min: -96.200 uS max: 108.000 uS sdev: 6.100 uS


You play with two different os's: buster and mint. That is OK, however, try to be consistent regarding kernels and desktops if you want a comparison that may lead to a conclusion. (Remark: I think, Mint is also available in version 19.3.) Kernels do play a major role for latency, desktops too. Further play with bios and "GRUB_CMDLINE_LINUX_DEFAULT" (see post above for hints).

What is a good range?

I'd say you got it already, as long as there are no real time delay messages. You might be able to bring these values down, again, see post above.

Even with Buster my numbers seem quite a bit higher relatively speaking than other posts here. I am using the onboard GPU, how much of an impact would that be?


We want low latency, yes. But this is not a race to be won. It is all about finding a reasonable good value to run / control your CNC machine with. Again see my post above.

If you play, play one option, test, note the values, then go to next option.

hth
chris

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

More
5 years 9 months ago #193820 by tommylight

seuchato wrote: I'd set the value in LinuxCNC to 120 -130% of the obtained latency data ..

That is valid for base period when using parallel port. Mesa boards do not use base period at all, and the servo period should be left at default 1000000 ( 1 mill ).

seuchato wrote: I have seen some Radeon GPU's doing bad stuff to latency too

Usually AMD/ATI GPU's are OK as they do not care much about compliance to power requirements, but i had a Radeon 7thausandsomething that i literally threw in the trash as it would mess up latency to extreme heights.

seuchato wrote: "do some real world testing by running the PC on real data, just disconnected from the motors for hours. If there are no " real time delay" messages, you should be fine". I second that.

That is always the best and the only safe way of making sure everything is OK, there is no simple way of reproducing everything that goes on inside a PC with a test.
Regards,
Tom.
The following user(s) said Thank You: seuchato

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

Time to create page: 0.355 seconds
Powered by Kunena Forum