2.8.2/Buster: should I use isolcpus=1 or cpuset

More
4 years 4 months ago #245949 by tatel
Hi all

After some quite happy years with 2.7.x, I'm testing some refurbished machines with 2.8.2. IIRC, I have read quite a few times that isolcpus=1 was deprecated and that last linuxcnc versions use cpuset. So I'm trying to use cpuset, yet I'm getting better latencies with isolcpus=

Could you guys give me any pointer about how to use cpuset or should I continue to use isolcpus=?

Cheers

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

More
4 years 4 months ago #245958 by tommylight
Use whatever works best for you, no harm in using either.
Although i have not seen cpuset mentioned here on this forum.
Depreciation of isolcpus refers to new PC's with more cores and better processor load balancing, so no need for it.
The following user(s) said Thank You: tatel

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

More
4 years 4 months ago - 4 years 4 months ago #246077 by tatel
It turns out that the word "deprecated" is in kernel parameters doc for 4.19

www.kernel.org/doc/html/v4.19/admin-guid...rnel-parameters.html
Code:
isolcpus= [KNL,SMP,ISOL] Isolate a given set of CPUs from disturbance. [Deprecated - use cpusets instead] Format: [flag-list,]<cpu-list>

You are very probably right about cpuset not mentioned here, but I got it indirectly from this helpful andypugh's answer

So, going to SabbyX's github , one gets info about both isolcpu's and cpuset

Yet some more clarity would be quite helpful, he talks about insmod:
Code:
Then what you have to do on the RTAI side is to load the core RTAI HAL moduleusing something like: "insmod rtai_hal.ko IsolCpusMask=<xxx>", where <xxx> is the mask of isolated CPUs[/code} However that seems to just load the module into the kernel, but some more info about how to start axis GUI, etc, would be helpful. I.E, when testing latency, I do... [code]taskset 1 latency-histogram{/code] ...or even... [code]taskset 1 linuxcnc

...to see what the latency could really be using isolcpus/make sure linuxcnc isn't getting disturbed by other system tasks

In the cpuset initscript example, again the code seems quite clear to me, however having also the commands to start each part of linuxcnc in each cpuset would be also helpful

I'm going to test, among others, a 4-core computer and, since this is a more powerful machine, isolcpus is deprecated by kernel developers so probably missing in the future, and cpuset is said to be "better than isolcpus", I'm trying cpuset (at this moment in an Athlon X2 dual core machine). Yet I'm getting better results with isolcpus, so I guess I'm getting something wrong about launching linuxcnc via cpuset (and probably so even via isolcpus) .

So my questions are about:

1- How to launch linuxcnc to be sure it gets one or more CPUs exclusively for himself.
2- In the example, SabbyX seems to put the GUI (axis, whatever) in the second core, which wouldn't be a real-time one. ¿Am I getting it right? What command should I use to do that?

(edited twice, first for typos then for tag mess)
Cheers
Last edit: 4 years 4 months ago by tatel. Reason: typo, tags got messed

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

More
4 years 4 months ago #246226 by andypugh
I would be interested to see what you conclude. I don't know the answers.

The only way to sort out the tags after editing is to switch to the full editor and click the "source" button, so that you can see and edit the tags.

It's a terrible mess, this current editor.

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

More
4 years 4 months ago #246287 by tatel
Well, I'm fighting my way through it right now. Should I be able to get somewhere I'll report about it. Would be easier if anyone could confirm if launching linuxcnc via taskset is OK, etc. In absence of confirmation/instrucyions, I'll do it my way...

About editing message tags in source: nope, I tried it some three times before giving up. It got messed anyway

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

More
4 years 4 months ago #246290 by robertspark
I use isolcpus

I generally run quad cores
so the CPUs numbering starts from "0" zero to 3 in my case.

I tend to use 1,2,3

but I test all configs on latency
set / change
reboot
retest for about 5 mins
set/change
repeat

write the numbers on a notepad and use the lowest number then do a long 2 hour test.

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

Time to create page: 0.092 seconds
Powered by Kunena Forum