Latency, error finishing read, and IRQ affinity
- tommylight
- Away
- Moderator
Less
More
- Posts: 18730
- Thank you received: 6297
12 May 2024 11:00 #300433
by tommylight
Replied by tommylight on topic Latency, error finishing read, and IRQ affinity
Is the processor 4 core or 2 core 4 thread one? Set that to 2 and do some tests just in case. Also try 1, but that might make the PC slouchy.
In general, disable hyperthreading, power saving, virtualisation, TPM, turbo mode, pci-e agressive link management, C states.
In some cases disabling sound helps, also disable serial ports if any and modem.
Open a terminal, type
Sensors
Then start LinuxCNC, enable it and try to jog, then go to terminal and again type sensors, notice the processor temperature. If it goes above 60-70C, open the PC, remove CPU cooler, clean, repaste, mount the cooler. Test again.
In general, disable hyperthreading, power saving, virtualisation, TPM, turbo mode, pci-e agressive link management, C states.
In some cases disabling sound helps, also disable serial ports if any and modem.
Open a terminal, type
Sensors
Then start LinuxCNC, enable it and try to jog, then go to terminal and again type sensors, notice the processor temperature. If it goes above 60-70C, open the PC, remove CPU cooler, clean, repaste, mount the cooler. Test again.
The following user(s) said Thank You: Swag
Please Log in or Create an account to join the conversation.
12 May 2024 11:59 #300434
by Swag
Replied by Swag on topic Latency, error finishing read, and IRQ affinity
It is four core, at least according to everything I have read. I increased the servo-thread to 2000000 and halved the P values and that actually had an effect, but it still errored out after a while, it just took longer. Temps are nil, 30° while running a program in LCNC. I am going to test everything again under 2.8 and maybe try a SEEED Odyssey I have here.
acpitz-acpi-0
Adapter: ACPI interface
temp1: +31.0°C (crit = +100.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +31.0°C (high = +105.0°C, crit = +105.0°C)
Core 0: +31.0°C (high = +105.0°C, crit = +105.0°C)
Core 1: +31.0°C (high = +105.0°C, crit = +105.0°C)
Core 2: +31.0°C (high = +105.0°C, crit = +105.0°C)
Core 3: +30.0°C (high = +105.0°C, crit = +105.0°C)
Please Log in or Create an account to join the conversation.
12 May 2024 15:00 - 12 May 2024 15:00 #300440
by PCW
Can you post the results of running this script:
to run
mv checkmask.txt checkmask
chmod +x checkmask
then
./checkmask enp2s0
Replied by PCW on topic Latency, error finishing read, and IRQ affinity
Can you post the results of running this script:
to run
mv checkmask.txt checkmask
chmod +x checkmask
then
./checkmask enp2s0
Attachments:
Last edit: 12 May 2024 15:00 by PCW.
The following user(s) said Thank You: Swag
Please Log in or Create an account to join the conversation.
12 May 2024 15:21 #300441
by Swag
Replied by Swag on topic Latency, error finishing read, and IRQ affinity
Here the results from the Debian 12 system that is not working:
And here the results from the Debian 10 system that is working (same computer, just swapping HDD back and forth):
Cores: 4
Actual CPU Mask: 2
Desired CPU Mask: 8
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.1.0-21-rt-amd64 root=UUID=404def33-1162-4fb1-89b1-fe0f54513cfc ro quiet isolcpus=3 intel_idle.max_cstate=1 i915.enable_rc6=0
And here the results from the Debian 10 system that is working (same computer, just swapping HDD back and forth):
Cores: 4
Actual CPU Mask: 2
Desired CPU Mask: 8
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.19.0-26-rt-amd64 root=UUID=85bd3bc9-e8c5-4aa9-99cb-c3ad9df9ef66 ro initrd=/install/gtk/initrd.gz quiet isolcpus=3 intel_idle.max_cstate=1 i915.enable_rc6=0
Please Log in or Create an account to join the conversation.
12 May 2024 15:41 #300442
by PCW
Replied by PCW on topic Latency, error finishing read, and IRQ affinity
Can you try pinning the Ethernet IRQ to the last processor:
Use by
mv pinirq.txt pinirq
chmod +x pinirq
sudo ./pinirq enp2s0
and then try LinuxCNC again
NOTE: Look at the script before you run it as with any script
from unknown sources, especially scripts that need sudo...
Use by
mv pinirq.txt pinirq
chmod +x pinirq
sudo ./pinirq enp2s0
and then try LinuxCNC again
NOTE: Look at the script before you run it as with any script
from unknown sources, especially scripts that need sudo...
Attachments:
The following user(s) said Thank You: Swag
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 18730
- Thank you received: 6297
12 May 2024 15:54 #300443
by tommylight
Replied by tommylight on topic Latency, error finishing read, and IRQ affinity
Question, why and where did you get the info about using i915 in the kernel line?
Remove that, update grub and try again.
-
Pretty sure i read hundreds of times about i915 having to be blacklisted a few years back, so using it now seems really strange.
It was an intel chipset that lasted till i965 or i945, so that is superseded, probably 15 or more years ago.
Remove that, update grub and try again.
-
Pretty sure i read hundreds of times about i915 having to be blacklisted a few years back, so using it now seems really strange.
It was an intel chipset that lasted till i965 or i945, so that is superseded, probably 15 or more years ago.
Please Log in or Create an account to join the conversation.
12 May 2024 15:55 #300444
by Swag
Replied by Swag on topic Latency, error finishing read, and IRQ affinity
Strange, for some reason I thought the rt_setup script had already done that. Obviously I was mistaken as that does seem to have done the trick, have the original servo_thread value and have run multiple times through the test program.
Really can not thank you enough and sorry that I missed that in all my other troubleshooting.
Really can not thank you enough and sorry that I missed that in all my other troubleshooting.
Cores: 4
Actual CPU Mask: 8
Desired CPU Mask: 8
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.1.0-21-rt-amd64 root=UUID=404def33-1162-4fb1-89b1-fe0f54513cfc ro quiet isolcpus=3 intel_idle.max_cstate=1 i915.enable_rc6=0
Please Log in or Create an account to join the conversation.
12 May 2024 16:00 - 12 May 2024 16:02 #300445
by Swag
Replied by Swag on topic Latency, error finishing read, and IRQ affinity
I do not know where the i915 came from, this is a vanilla install from the distro and the 2.8 was the same. Ah, I see, it is in the rt_setup script pinned to the start of this thread. I did run that in both setups trying to bring latency down.
if ! grep -vE '^[[:space:]]*#' $GRUB_FILE | grep -E '^[[:space:]]*GRUB_CMDLINE_LINUX_DEFAULT.*i915.enable_rc6' > /dev/null
then
echo "Disabling intel graphics power save option."
sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT=/ s/\"$/ i915.enable_rc6=0\"/" $GRUB_FILE
do_update_grub=1
fi
Last edit: 12 May 2024 16:02 by Swag.
Please Log in or Create an account to join the conversation.
12 May 2024 16:03 #300447
by PCW
Replied by PCW on topic Latency, error finishing read, and IRQ affinity
The i915 driver supports basically all Intel graphic chips except the GMA500 series
That kernel command line is fine
That kernel command line is fine
The following user(s) said Thank You: Swag
Please Log in or Create an account to join the conversation.
12 May 2024 16:10 - 12 May 2024 16:17 #300448
by PCW
Replied by PCW on topic Latency, error finishing read, and IRQ affinity
Mozmcks script requires editing to match your IP address setup
or it will not setup the irq mask.
Note that my simple script just sets the mask temporarily and would
need to be re-run after re-boot. In addition, if irqbalance is not disabled
the mask setting will be eventually undone by irq balance.
The main point of my script is for testing
or it will not setup the irq mask.
Note that my simple script just sets the mask temporarily and would
need to be re-run after re-boot. In addition, if irqbalance is not disabled
the mask setting will be eventually undone by irq balance.
The main point of my script is for testing
Last edit: 12 May 2024 16:17 by PCW.
Please Log in or Create an account to join the conversation.
Time to create page: 0.204 seconds