RPI4 Servo Lateceny Spikes

  • destruction_cereal
  • destruction_cereal's Avatar Topic Author
  • Visitor
  • Visitor
31 Jul 2020 00:53 #176590 by destruction_cereal
RPI4 Servo Lateceny Spikes was created by destruction_cereal
I am attempting to run linuxcnc on my Pi 4.
I am using a 64 bit image found here, www.forum.linuxcnc.org/9-installing-linu...94-rpi4-debian-64bit.
After building I had a max servo thread of over 103,999,177 and a max jitters of something like 102,999,177 and the last interval showing around 1016-1020 while idle. (Not a typo.)

I can't find it again but on the forums, I found a link to a site that told you how to modify the /boot/cmdline.txt file to reduce it. Other on the forum were saying it worked rather well but when I tried it, my latency went to over 500,000,000 on the max intervals.
Weirdly, my max base thread is at 91,000, 67,000 and 24,000

My first attempt, I downloaded a 32 bit image I found elsewhere on the forums and was getting a max interval for my servo thread of 1,200,000, a max jitter of 95,000 and have the Last Interval hovering around 1,100,000.

How on earth do I fix this?

If you need any more information, please let me know.

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

More
31 Jul 2020 07:43 #176610 by tommylight
try this
latency-histogram --nobase --sbinsize 1000 --show
post a screenshot after running for about half an hour, while during the test watching youtube and copy something over.
The following user(s) said Thank You: destruction_cereal

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

  • destruction_cereal
  • destruction_cereal's Avatar Topic Author
  • Visitor
  • Visitor
31 Jul 2020 14:41 - 31 Jul 2020 14:50 #176667 by destruction_cereal
Replied by destruction_cereal on topic RPI4 Servo Lateceny Spikes
Here is a plot that I do not understand.
I assume its showing the distribution of latency points
I'll try some things while I wait for replies to see what changes.

As a side not, this build is not the one I made the cmdline modifications to. Its more or less a fresh build.

I want to run a 7i76E from this. Do I need to focus on base thread or servo thread for that?
Attachments:
Last edit: 31 Jul 2020 14:50 by destruction_cereal. Reason: Forgot how english worked.

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

More
31 Jul 2020 14:51 #176668 by PCW
Replied by PCW on topic RPI4 Servo Lateceny Spikes
You might try isolcpus =1,2,3
The following user(s) said Thank You: destruction_cereal

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

  • destruction_cereal
  • destruction_cereal's Avatar Topic Author
  • Visitor
  • Visitor
31 Jul 2020 15:07 #176670 by destruction_cereal
Replied by destruction_cereal on topic RPI4 Servo Lateceny Spikes
I added that to my cmdline.txt file and the result has changed. I assume its better.

I took a screenshot around 2-3 minutes. It looks pretty similar around 15 minutes


If i run the standard latency test though, then then numbers are ridiculous.
Max interval 71998871
max jitter 70998871
Last interval 900-1000
Attachments:

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

More
31 Jul 2020 15:11 #176671 by PCW
Replied by PCW on topic RPI4 Servo Lateceny Spikes
Its expected that the standard latency test will fail unless you disable the base thread
(the RPI4 + current Preempt-RT kernels cannot possibly handle a 40 KHz base thread)
The following user(s) said Thank You: destruction_cereal

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

  • destruction_cereal
  • destruction_cereal's Avatar Topic Author
  • Visitor
  • Visitor
31 Jul 2020 15:19 #176673 by destruction_cereal
Replied by destruction_cereal on topic RPI4 Servo Lateceny Spikes
Thats good to know. My previous attempts to bring the latency down probably didn't entirely fail as I previously thought.

Is what I have currently usable for a 7I76E?

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

More
31 Jul 2020 16:18 #176678 by tommylight
Only servo thread is needed and it is usable for 7i76E.
The following user(s) said Thank You: destruction_cereal

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

  • destruction_cereal
  • destruction_cereal's Avatar Topic Author
  • Visitor
  • Visitor
31 Jul 2020 16:21 #176679 by destruction_cereal
Replied by destruction_cereal on topic RPI4 Servo Lateceny Spikes
Perfect. Thanks for the help.

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

Time to create page: 0.282 seconds
Powered by Kunena Forum