Script for automated testing of computer latency.

More
20 Jun 2020 22:20 - 02 Oct 2020 17:27 #172199 by tommylight
Attached is a script that can be used to test latency on PC's and laptops intended for use with LinuxCNC
The script is made by user "seuchato", all credits go to him for the effort put into this.
-Does not work on Debian Wheezy Linux.

---How it works?
-It uses latency histogram to test and generate latency info,
-It starts several (default is 5) glxgears and resizes them several times to stress the graphic subsystem,
-It opens Firefox pointing to a video of surfing the waves in Cape Town, and resizes the video after a while, leave autoplay on if doing a longer run,
-It also checks the hardware and software used,
-By default it will run for 2 hours using base and servo threads,
-It will exit at any latency bigger than 25000ns for the base thread and 1000000ns for the servo thread,
-It creates two files with all the relevant data form each run saved on them for comparison or posting here:
forum.linuxcnc.org/18-computer/39371-res...or-use-with-linuxcnc
---How to use?
-Extract the downloaded zip file, double click on it and choose "run in terminal"
-If that does not work, open a terminal, CD to where the extracted file is and paste this
sudo ./lcnc-hw
-At the menu, if you want to run with default settings, just press enter,
-If you select "No" other menu's will be presented , so follow the instructions on screen,

Use this topic only to post further improvements to the script, issues if any, and suggestions on improving it.
Do not use this topic for posting test results, use the link above for that.[/color
This script is offered "as is" and as such holds no liability, implicit or otherwise.
Released under the LGPL licence:
###################################################################
#                                                                 #
# Script to read the releveant parameters to build a more recent  #
# database for linuxcnc pc hardware                               #
#                                                                 #
# I provide the script as is. No warrenties are granted, not      #
# even that the script is fit for the intended purpose.           #
#                                                                 #
# I put it under the LGPL Version 3. a copy of this license can   #
# found here: https://www.gnu.org/licenses/lgpl-3.0.html          #
#                                                                 #
###################################################################
#                                                                 #
# Targets, I hope to meet:                                        #
# . Comparability: hopefully this proposal leads to comparable    #
#   latency test data.                                            #
# . Repeatabilty: given the fast change in PC hard/software       #
#   probably hard to achieve, if asked to be consistent.          #
# . Still, we intend to run cnc machines with potential of        #
#   danger using stock pc hardware. Therefore we should at least  #
#   try to figure out what suits, is acceptable and/or reliable   #
#   enough. Could result in a potential conflict of goals though. #
#                                                                 #
# V 20200624                                                      #
#   added lookup for sound/pcspkr chipset                         #
#   Message when CTRL-C is pressed to standby for a graceful exit #
#   Some info on progress when installing software                #
#   clearer output when doing latency test                        #
#   I put the script under LGPL license                           #
#                                                                 #
# V 20200619-c                                                    #
#   general rework, using functions instead of spaghetti code,    #
#    with the help of"dialog" added :                             #
#     choice of base thread or no base thread                     #
#     choice of time to run                                       #
#     option for base thread at 100000                            #
#    firefox as default browser                                   #
#    option to quit by pressing ^C                                #
#                                                                 #
# V 20200615                                                      #
# initial version                                                 #
#                                                                 #
###################################################################
Attachments:
Last edit: 02 Oct 2020 17:27 by tommylight. Reason: New file
The following user(s) said Thank You: Mike_Eitel, seuchato, phillc54, chimeno, arvidb, Clive S, berntmartin

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

More
22 Jun 2020 09:23 #172309 by seuchato
Hi all, Il add:
  • Lookup for chipset, check if pcspkr and/ or any sound modules are loaded
  • Message when CTRL-C is pressed to standby for a graceful exit
  • Some info on progress when installing software
  • clearer output when doing latency test
Greez
chris
The following user(s) said Thank You: tommylight, berntmartin

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

More
24 Jun 2020 09:47 #172556 by seuchato
I am a bit puzzled about the output taken from here
RAM related data:
Maximum Memory Module Size: 1024 MB
Maximum Total Memory Size: 4096 MB
Maximum Capacity: 4 GB
Maximum Memory Module Size: 1024 MB
Maximum Total Memory Size: 4096 MB
Installed Size: 2048 MB (Single-bank Connection)
Enabled Size: 2048 MB (Single-bank Connection)
Installed Size: 2048 MB (Single-bank Connection)
Enabled Size: 2048 MB (Single-bank Connection)
Installed Size: 2048 MB (Single-bank Connection)
Enabled Size: 2048 MB (Single-bank Connection)
Installed Size: Not Installed
Enabled Size: Not Installed
Size: 2048 MB
Size: 2048 MB
Size: 2048 MB
Size: No Module Installed

@ chimeno: could you kindly run the following command and post all output here?
sudo dmidecode -t memory | grep Maximum | sed  "s/\t//g"
 sudo dmidecode -t memory | grep Size | sed  "s/\t//g"

Tia
chris

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

More
24 Jun 2020 10:09 #172561 by tommylight
Here is what i get:
cnc@shop:~$ sudo dmidecode -t memory | grep Maximum | sed  "s/\t//g"
[sudo] password for cnc:    
Maximum Capacity: 16 GB
cnc@shop:~$  sudo dmidecode -t memory | grep Size | sed  "s/\t//g"
Size: 2048 MB
Size: 2048 MB
It seems Chimeno has 3 DIMM modules of 2GB installed but only 4GB are supported so 2 are not used

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

More
24 Jun 2020 10:18 #172564 by chimeno
Hello @seuchato
if there is no problem, here you are.
Maximum Memory Module Size: 1024 MB
Maximum Total Memory Size: 4096 MB
Maximum Capacity: 4 GB
Maximum Memory Module Size: 1024 MB
Maximum Total Memory Size: 4096 MB
Installed Size: 2048 MB (Single-bank Connection)
Enabled Size: 2048 MB (Single-bank Connection)
Installed Size: 2048 MB (Single-bank Connection)
Enabled Size: 2048 MB (Single-bank Connection)
Installed Size: 2048 MB (Single-bank Connection)
Enabled Size: 2048 MB (Single-bank Connection)
Installed Size: Not Installed
Enabled Size: Not Installed
Size: 2048 MB
Size: 2048 MB
Size: 2048 MB
Size: No Module Installed

Hi @tommylight

It seems Chimeno has 3 DIMM modules of 2GB installed but only 4GB are supported so 2 are not used

you're right!
you are right!! a memory module had some unexpected errors.

Greeting
Chimeno
The following user(s) said Thank You: tommylight

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

More
24 Jun 2020 11:45 #172570 by seuchato
@ chimeno: I suggest you should run the machine according to specs, using 1024 MiB Ram modules, thanks anyway
@ tom: Thanks, wouldn it seem that chimeno's PC uses two Dimms and supports surprisingly 2048 MiB per Dimm? Maybe he can get a good machine by just using two 2GB dimms, but I also suggest, he should set isolcpus=1,2,3 and idle=poll.
Got the new version ready. If I send it to you by pm, could you kindly exchange it against the old version in your first post?

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

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

More
24 Jun 2020 11:57 #172571 by tommylight
It is working for him, maybe just removing the not used DIMM.
Most older PC's will support one sided 2GB modules even if it says 1GB, but will completely ignore one side of the two sided modules, reporting it as 1GB although it is a 2GB module.
Isolcpu has not much of an effect on newish PC, so it will just make the PC very sluggish.
There is no PM here, so just attach it here and i will move it to the original post.
Thank you.

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

More
24 Jun 2020 12:20 #172574 by seuchato
What is a suitable license for this script?
LGPL?

I want it to be free, for anyone to use.

greez
chris

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

More
24 Jun 2020 13:02 #172577 by tommylight

What is a suitable license for this script?
LGPL?

That seems appropriate.

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

More
24 Jun 2020 13:38 - 24 Jun 2020 13:39 #172583 by seuchato
here you go

Kinda changelog:
###################################################################
#                                                                 #
# Script to read the releveant parameters to build a more recent  #
# database for linuxcnc pc hardware                               #
#                                                                 #
# I provide the script as is. No warrenties are granted, not      #
# even that the script is fit for the intended purpose.           #
#                                                                 #
# I put it under the LGPL Version 3. a copy of this license can   #
# found here: https://www.gnu.org/licenses/lgpl-3.0.html          #
#                                                                 #
###################################################################
#                                                                 #
# Targets, I hope to meet:                                        #
# . Comparability: hopefully this proposal leads to comparable    #
#   latency test data.                                            #
# . Repeatabilty: given the fast change in PC hard/software       #
#   probably hard to achieve, if asked to be consistent.          #
# . Still, we intend to run cnc machines with potential of        #
#   danger using stock pc hardware. Therefore we should at least  #
#   try to figure out what suits, is acceptable and/or reliable   #
#   enough. Could result in a potential conflict of goals though. #
#                                                                 #
# V 20200624                                                      #
#   added lookup for sound/pcspkr chipset                         #
#   Message when CTRL-C is pressed to standby for a graceful exit #
#   Some info on progress when installing software                #
#   clearer output when doing latency test                        #
#   I put the script under LGPL license                           #
#                                                                 #
# V 20200619-c                                                    #
#   general rework, using functions instead of spaghetti code,    #
#    with the help of"dialog" added :                             #
#     choice of base thread or no base thread                     #
#     choice of time to run                                       #
#     option for base thread at 100000                            #
#    firefox as default browser                                   #
#    option to quit by pressing ^C                                #
#                                                                 #
# V 20200615                                                      #
# initial version                                                 #
#                                                                 #
###################################################################

greez
chris
Attachments:
Last edit: 24 Jun 2020 13:39 by seuchato.

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

Time to create page: 0.286 seconds
Powered by Kunena Forum