isolcpus idiot's guide?

More
05 Sep 2025 11:37 - 05 Sep 2025 11:38 #334485 by Jonathan_H
isolcpus idiot's guide? was created by Jonathan_H
Hi,

I have LinuxCNC running on a Lenovo m710q with a Realtek NIC.

I regularly get an error saying the servo thread is probably too fast, but the thread is set to 1khz and this post suggests that the hardward I am running should be able to manage a stable 2kHz servo thread

forum.linuxcnc.org/18-computer/56231-get...h-pc-and-mesa#329327

I have gone into the BIOS and turned off all the features that you are told to turn off.

From that thread and a couple of others, it seems that perhaps the solution lies in Isolcpus, however I'm rather unclear as to what I need to set where. I gather that it is a configuration setting to remove a cpu core from the scheduler, but are then how do I get what I want to run on that core on there?

Is there an idiot's guide anywhere?

regards

Jonathan



 
Last edit: 05 Sep 2025 11:38 by Jonathan_H.

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

More
05 Sep 2025 12:32 #334491 by langdons
Replied by langdons on topic isolcpus idiot's guide?
General rules for CNC

Be on the safe side, you want stability over absolute maximum performance.

Set the CPU governor to performance.

askubuntu.com/a/1530756

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

More
05 Sep 2025 15:32 - 05 Sep 2025 15:34 #334498 by PCW
Replied by PCW on topic isolcpus idiot's guide?
To change isolcpus you edit /etc/default/grub as root

Something like:

xed admin:///etc/default/grub

 or

sudo xed /etc/default/grub

and then in the grub file change this line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

To something like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash isolcpus=3 idle=poll"

(3 assuming you have a 4 core CPU)

When you have saved your changes, you run:

sudo update-grub

and then reboot

Also with RealTek MACs it's likely that you will need to replace the normal RealTek
Ethernet driver with the DKMS version (search the forum for DKMS)

One additional step to improve Ethernet latency is to pin the Ethernet interrupt
to the last (real-time) CPU

To get an idea of Ethernet latency, you can run this command:

sudo chrt 99 ping -i .001 -q -c 60000 (card_ip_address)

This will run for 1 minute and then print statistics
 (card_ip_address) is the motions control cards IP address





 
Last edit: 05 Sep 2025 15:34 by PCW. Reason: forgot update-grub
The following user(s) said Thank You: JT

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

Time to create page: 0.072 seconds
Powered by Kunena Forum