Hardware latency tests, used PC's

More
6 years 4 months ago #171097 by seuchato
Replied by seuchato on topic Hardware latency tests, used PC's

tommylight wrote: ...
You can install Linux and Linuxcnc on a PC, yank it out, put a USB to SATA adapter and plug it to any PC or Laptop and it will boot and work properly ! Make windows do that, not in your or my lifetime ! :)
...


You're running through wide open doors: I have two laptops running windoze as second os, the rest of my machines are all only linux. :-)
The following user(s) said Thank You: tommylight

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

More
6 years 4 months ago #171098 by seuchato
Replied by seuchato on topic Hardware latency tests, used PC's

tommylight wrote: One important thing to keep in mind during latency testing, resize the glxgears and youtube videos to full screen and back, as that will cause spikes always, especially the 4k videos on older PC's.
Command to use for latency testing in terminal:

Code:
latency-histogram --nobase --sbinsize 1000 --show
For base and servo thread:
Code:
latency-histogram --bbinsize 1000 --sbinsize 1000 --show


I am writing a script to test my machines. If it does what I want, I will put it here in a new thread. I will include your suggestion for maximising glxgears and video windows and the base and servo thread command. You happen to know how to send a keystroke to an app in bash? Cause that's what I would love to do from time after time in my bash script.
greez
chris
The following user(s) said Thank You: tommylight

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

More
6 years 4 months ago #171122 by tommylight
Replied by tommylight on topic Hardware latency tests, used PC's

seuchato wrote: You happen to know how to send a keystroke to an app in bash? Cause that's what I would love to do from time after time in my bash script.

Nope. Sorry.

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

More
6 years 4 months ago #171711 by seuchato
Replied by seuchato on topic Hardware latency tests, used PC's
I got a script up and am test running for 2 hours now. If it succeeds, I will publish it as a proposal and subject to improvement.
Two questions:
  • What is a reasonable time for "latency-histogram --bbinsize 1000 --sbinsize 1000 --show" to run? Is two hours enough?
  • I remember a PC having unexpected RT problems. The machine is at friends house now. He will be willing to let me test ist. How do I capture the expected RT-Errors?
Greez
chris
The following user(s) said Thank You: tommylight

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

More
6 years 4 months ago #171723 by tommylight
Replied by tommylight on topic Hardware latency tests, used PC's
There is one issue to be aware of when testing for latency on 64 bit machines with "uspace" flavour of Linuxcnc:
-Wen running latency histogram, it will set the processor at max speed and will not allow them to go down as long as the test is running,
-When running LinuxCNC on the same machine the processors will throttle up and down depending on load,
That leads to the following:
-While running LinuxCNC there is still the possibility of latency excursions despite getting good latency numbers on latency histogram,
-Setting the CPU governor to max performance should avoid this issue
-On low quality laptops setting the processor to max performance will cause them to overheat, and all laptops will run at high processor temperature making the possibility of thermal throttling very high, hence risk of latency excursions,
-LinuxCNC runs nicely on very few laptops without setting the processor to max performance and the temperatures remaining at a reasonable levels,
-This is not a big issue for PC's as most of them can handle higher temperatures easily,
-Some laptops have BIOS settings to set the processor at the lowest frequency and disable speedstep during work, this can work nicely for LinuxCNC despite low frequency.
-
-Running latency tests for an hour should be enough to get a reasonable result to grant real life tests,
-Real life tests should be run for at least a day with Mesa board active, stepgens are good for this as the tests can be done without any hardware attached, i test them for two days, so 48 hours of running gcode without dropping the connection or latency errors.
-
Latency errors for software stepping using base period/base thread can be easily avoided by setting the base thread to a higher value within reason, on some machines that do not require high frequency stepping i can set the base thread to 300000 and have a working machine despite bad latency,
Similarly, setting the servo thread to 2000000 can make some PC's/laptops usable, although i never use this as the risk of errors is to high.
The following user(s) said Thank You: seuchato, Clive S

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

More
6 years 4 months ago #171739 by seuchato
Replied by seuchato on topic Hardware latency tests, used PC's
tommylight, Thanks a ton for your valuable explanations. Things up in clouds start up to get clearer thanks to your explanation

So, if I get you right, we should set CPU governor to performance for real life too?

Could be done just before starting linuxcnc like this I guess:
Code:
sudo apt-get install cpufrequtils echo 'GOVERNOR="performance"' | sudo tee /etc/default/cpufrequtils sudo systemctl disable ondemand

Regarding my test script: ran through for two hours now. It provides a set of info on the machine, a nice histogram. I still don't like to have to manually hit the screenshot button to safe the histogram. I know, I can run latency-histogram with "--nox" but then, I do not have the graphical histogram and a huge data grave. Is there a way to get the data the graphical histogram collects, summed up in a text file?
Plus: got the machine from my friend, provides reliable "realtime delay" errors. Still struggling to get these Errors logged in a file.

greez
chris
The following user(s) said Thank You: tommylight

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

Time to create page: 0.144 seconds
Powered by Kunena Forum