Q: Auto-moving RT processes to isolated core with RT kernel

More
29 Aug 2018 19:58 #116820 by LinuksGuru
Hi !

I just did custom install of LinuxCNC 2.7.14 on Debian 9 Stretch with 4.16.18 RT kernel.
However, from what I read on forum and docs, LinuxCNC automatically runs on isolated core only with RTAI kernel (another flavor of real-time implementation).

1) Which LinuxCNC tasks/processes (by name) should be run on isolated core? I can dig it myself of course yet better to hear from someone with experience.
2) This is probably question to LinuxCNC developers - are these RT processes spawned with shell / python scripts or compiled code? If first, I can make a patch to launch them on isolated CPU with taskset, please point to the source file / line.

I can make cron script which scans running processes and moves them to isolated core, yet it's kinda awkward workaround.

Thanks in advance for any help.

PS. If someone wants my 4.16.18 RT kernel I can share it.
The following user(s) said Thank You: irakandjii

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

More
29 Aug 2018 20:28 #116822 by tommylight
I do not recall reading anywhere that RT kernel benefits from isolated cpu's but read plenty about RTAI benefiting from it. I never ever tested it or any other tricks listed to improve latency as i do not like using best case scenarios and ending up with something messed up later, i just stick a UBS and run live version of what i need, RTAI or RT and check the latency for bout half an hour while molesting the computer properly with youtube, glxgears, hdd speed test, simple scan, media player etc. If i get decent numbers i move on, usually i do. The one thing i noted on plenty of computers is i get much better latency numbers running live from USB than form an actual install on a HDD. Lately using SSD i see no such issues. I however do disable everything related to power saving, wake ups, modems, serial ports even sound cards in the BIOS, and that does improve things very much, especially on IBM T42 and X60 going from 60000 to 115000 down to rarely above 15000.
This is all just my experience and i am aware that it is not an answer to your question, but related to it.

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

More
08 Oct 2018 17:20 #118548 by irakandjii
I have the same question. I am new to linux, but familiar with real-time / deterministic systems. So I like the idea of isolating LinucCRC to dedicated cores. but first I need a functioning real-time OS.

Would it be possible for you to share how you built the kernel?
I am trying to learn how to do this and having little success.
I have new hardware Gigabyte Z370, i5 8600k, 16 gB memory running off a 256 GB pci ssd (idea is to be as "quick as reasonable").

I am using Ubuntu 18.04 LTS version bare-bones, with Samba, SSH and VNC. Use case is to develop models and G-code on the PC then transfer files to LinuxCNC for machining. The machine will also be used to run nodejs to support home automation 7/24

Progress so far:
I have followed the instructions in :
kernel-team.pages.debian.net/kernel-hand...ml#s-common-official
and reached the step where I am ready to apply the RT patch.

I keep failing here, so I am doing something wrong. Probably a version problem in downloading appropriate patches ... dunno...

Since I do not have a RT kernel I have not installed LinuxCNC yet.

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

More
08 Oct 2018 17:56 - 08 Oct 2018 17:59 #118550 by Todd Zuercher
I've never compiled a real time kernel. I have always used one of the precompiled ones, Either one of the RTAI ones included with the live Linuxcnc images, or a preempt-rt one downloaded from one of the Debian repos. (supposedly isolating cpus isn't advantageous for the preempt-rt kernels.)
Last edit: 08 Oct 2018 17:59 by Todd Zuercher.

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

Time to create page: 0.068 seconds
Powered by Kunena Forum