Another latency question

More
24 Jan 2018 13:43 #104936 by Tady
Hello

I'm running a debian 9 with RT preempt kernel on a HP pavilion db6 laptop. I have some issues with latency.
I was running latency test and I don't know if the numbers are any good.. I was fiddling with bios but this laptop doesn't have alot of settings. I was only able to turn of threading for VM.. The rest i don't know how to do..
I am a beginner in the LinuxCNC world.
Attachments:
More
24 Jan 2018 15:09 #104939 by skunkworks
Replied by skunkworks on topic Another latency question
What are you planning to do with it? If you are planning to use external hardware (mesa) - that is probably ok.

one thing to try is isolcpus=whatever your highest core is in the and maybe idle=poll in the kernel line... The cores start out at 0 so if you have a 4 core machine then isolcpus=3

This might have a performance hit on the system - though in my experience on newer computer hardware it isn't noticable

for testing - when the computer first boots to the grub screen - hit 'e' to edit. Look for the line that ends in 'quiet' and add isolcpus= and maybe idle=poll. then F10 to boot

sam
More
24 Jan 2018 15:25 #104941 by PCW
Replied by PCW on topic Another latency question
Also if you intend to use external hardware, you do not need a base thread so you can get a better
representation of the latency by disabling the base thread:

latency-test 1ms 1ms
or
latency-histogram --nobase
More
24 Jan 2018 16:10 #104942 by Tady
Replied by Tady on topic Another latency question
I'm running my own driver... I tried using the hm2_eth but it's too complicated for me.. I couldn't even find where the drivers talks to the ethernet card...
My driver sends position info over ethernet to a teensy MCU running at 180MHz... The comm works no problems there but I'm getting some strange behaviour from linuxCNC i think there is something wrong with my install...

First of all i can't load trajectory planer (tp) in the hal file... Kinematics is trickins...

I have to use joint pins for command extraction.. If I use axis linuxcnc complains its not found.
I will post the errors when i get home.
The problem is at startup.. It takes very long.. So the kernel complains.. But its only at startup...

I programmed the MCU to loop data back so in theory it a sim... I made a loop in my gcode ald it ran for more than 8hours without problems:)))
More
24 Jan 2018 21:28 #104974 by Tady
Replied by Tady on topic Another latency question
Here is the output when I run from terminal:
Starting LinuxCNC...
emc/iotask/ioControl.cc 768: can't load tool table.
Found file(REL): ./tady_eth.hal
Note: Using POSIX realtime
note: MAXV max: 150.000 units/sec 9000.000 units/min
note: LJOG max: 150.000 units/sec 9000.000 units/min
note: LJOG default: 150.000 units/sec 9000.000 units/min
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
note: jog_order='XYZ'
note: jog_invert=set([])

And when I close LinuxCNC :

Shutting down and cleaning up LinuxCNC...
task: 84017 cycles, min=0.000020, max=0.770390, avg=0.078693, 0 latency excursions (> 10x expected cycle time of 0.100000s)
HostMot2 ethernet driver unloaded
Note: Using POSIX realtime

LinuxCNC runs fine I think the long delay is at startup when it is waiting for joints...
More
24 Jan 2018 21:53 #104982 by Tady
Replied by Tady on topic Another latency question
uname -a : Linux LinuxCNC 4.9.0-5-rt-686-pae #1 SMP PREEMPT RT Debian 4.9.65-3+deb9u2 (2018-01-04) i686 GNU/Linux

the isolcpus=3 did not work .... I started latency-histogram --nobase, and on the top left corner it says "no_isolcpus" so i think it did not woork when I edited the GRUB startup.

Now i got a max jitter of 548135 ... This clearly is sh*t :/
More
24 Jan 2018 22:05 #104983 by Tady
Replied by Tady on topic Another latency question
here is a screenshot of the histogram....

I found the culprit behind the 500k jitter... it is the hardware switch for the WiFi adapter... I ran LinuxCNC with WiFi off... so now I back to 70k jitter.
Attachments:
Moderators: ArcEye
Time to create page: 0.162 seconds
Powered by Kunena Forum