LinuxCNC on Raspberry Pi 5 CPU 3 not running

More
24 May 2024 21:06 #301357 by Marvin_Maverick
Hi,
I used this image: rpi-5-debian-bookworm-6.1.61-rt15-arm64-ext4-2023-11-17-1520.img.xz
to set up a Raspberry Pi 5 with LinuxCNC.
So far it worked fine. Thanks a lot to all the people that put this image together!!

Now I discovered, that the third CPU (Number "2") of the Raspberry is not running. When LinuxCNC is started, using "htop", I can see, that the third CPU has no load, it is idleing. In the cmdline.txt there is this entry: isolcpus=2,3 and it seams, that LinuxCNC only uses the fourth (Number "3") CPU.
Is there something that can be done to use all the computing power of the Raspberry Pi 5?

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

More
24 May 2024 22:18 #301360 by cornholio
2 cores run the day to day stuff
2 cores run the real-time stuff

Without isolating 2 cores latency takes a hit. It’s a common fix for latency on all platforms.
The following user(s) said Thank You: Marvin_Maverick

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

More
24 May 2024 22:52 - 24 May 2024 23:07 #301361 by Marvin_Maverick
The third CPU (Number "2") of the Raspberry is not running.
LinuxCNC ("realtime stuff") only uses Core Number 3 (the fourth)

Is there something that can be done to use both Cores (Number 2 and 3 = third and fourth) for LinuxCNC?
Last edit: 24 May 2024 23:07 by Marvin_Maverick.

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

More
25 May 2024 02:16 - 25 May 2024 02:20 #301365 by cornholio
Don't worry about it.

Everything will work fine when running a machine.

Have you tried htop when running gcode and actually running a machine ?

You can modify the isolcpu parameter, it's under the /boot folder in a subfolder, mind tho the boot folder has a different structure to the standard RPi one. It's been a while since I've used my RPi5 since helping Rod put the image together (due to the lack of a SPI driver for Mesa hardware).

Long story short latency will suffer without isolation. And depending how cache is shared between the cores there can be a performance hit by isolating the incorrect pair of CPUs (this was from a long forgotten paper). At the end of the day it's not outright performance this is vital with Linuxcnc but latency. Having a responsive interface and more importantly having latency within spec is all that matters. It's not as if you'll using the machine as a desktop whilst running a machine. Remember it's a single use computer, not a desktop.

Play around with isolating CPUs run some latency tests and see how you go. BTW what hardware are you using to control your machine.

Even on a multi core machine with no cpus isolated if the load doesn't require it you will have cores that are more or less idle.
Last edit: 25 May 2024 02:20 by cornholio.

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

More
25 May 2024 20:36 - 25 May 2024 20:42 #301441 by Marvin_Maverick
@cornholio:
Thank you for the reply.
"Have you tried htop when running gcode and actually running a machine ?"
No, so far I only did "dry-tests".
I plan to retrofit a EMCO F1 CNC Woodworker. For this machine I bought a Benezan Tripple Beast ( a long time ago...). My plan is to set up LinuxCNC on a Raspberry Pi 5 to control the Tripplebeast.
My last machine was a portal router (DIY) that was (still is) controlled by DC-Servos with UHU3.0-controllers that I build (also a very long time ago)

Regarding the RP5: I hope I can find time to test the setup on the bench next week.
When I have news, I'll post them here.

Than you for your help.
Last edit: 25 May 2024 20:42 by Marvin_Maverick.

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

More
26 May 2024 07:18 #301463 by cornholio

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

More
26 May 2024 12:46 #301473 by rodw
LinuxCNC just running a servo-thread only runs  a single Realtime thread. By definition thats gunna run on a single core as you observed. Maybe the base thread runs on a second core but i have never used a base thread.

When you run a ethernet connected device, machine latency is no longer important, its the network latency that limits performance. I think this means we should review how we evaluate PC suitability for LinuxCNC. latancy-histogram gives better results with multiple isolated cores but does that matter at all?

 

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

Time to create page: 0.081 seconds
Powered by Kunena Forum