isolcpus idiot's guide?

More
1 year 1 month ago #334485 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



 

Please Log in to join the conversation.

More
1 year 1 month ago #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





 

Please Log in to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum