Latency, error finishing read, and IRQ affinity

More
21 Dec 2024 22:20 - 21 Dec 2024 22:24 #317110 by itsbrian
Thanks mozmck for all this info and the bash scripts! This solved the weird issues I was running with on this new N100 PC I have.

I decided to brush up on my bash skills and update the original script.  

Features
  • Checks that script is being run as root/sudo.
  • Attempts to ping the common Mesa card IP addresses (192.168.1.121 and 10.10.10.10) and if it finds a unique one it will set that as the NIC variable in the irq bash scripts. If it doesn't find one it lists the possible options for the user to choose.
    • Downside of this is that it is not as dynamic as mozmck's script if there are any Mesa card interfaces changes, but I figured people rarely change that anyways.
  • Give instructions once the script is complete.

How to run
  • Rename rt_setup.sh.txt to rt_setup.sh
  • Make sure script is executable via command line:
    chmod +x /path/to/rt_setup.sh
    Replace /path/to/rt_setup.sh to where the actual file is.
  • Run script: 
    sudo /path/to/rt_setup.sh
    Again replace to where the actual path of the script is

Hopefully this helps those that are not software savvy!
Attachments:
Last edit: 21 Dec 2024 22:24 by itsbrian.
The following user(s) said Thank You: Lcvette, zmrdko

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

More
07 Apr 2025 05:24 #325854 by Diegot
I just discovery tuna, realtime IRQ tuning, my first impression was great.
Just test it at buster, going to bookworm now.

packages.debian.org/bookworm/tuna
The following user(s) said Thank You: rdtsc

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

More
17 Nov 2025 02:23 #338558 by BryceJ
Ran into an issue with IRQ balance after updating to trixie

Nov 16 19:34:22 hazelnut irqbalance[597]: IRQ 9 affinity is now unmanaged
Nov 16 19:34:22 hazelnut irqbalance[597]: Cannot change IRQ 14 affinity: Read-only file system
Nov 16 19:34:22 hazelnut irqbalance[597]: IRQ 14 affinity is now unmanaged
Nov 16 19:34:42 hazelnut irqbalance[597]: IRQ 123: Override ban to true
Nov 16 19:34:42 hazelnut irqbalance[1572]: /etc/linuxcnc/lcnc_irqbalancepolicy.sh: line 17: /proc/irq/123/smp_affinity: Read-only file system
Nov 16 19:37:52 hazelnut irqbalance[597]: Cannot change IRQ 135 affinity: Read-only file system
Nov 16 19:37:52 hazelnut irqbalance[597]: IRQ 135 affinity is now unmanaged



Turns out there was a bug version of irqbalance that is fixed with

github.com/Irqbalance/irqbalance/issues/308#issue-2217868587

after adding

/etc/systemd/system/irqbalance.service.d/override.conf

➜  ~ sudo cat /etc/systemd/system/irqbalance.service.d/override.conf
[Service]
ProtectKernelTunables=no

It fixed the ethernet mesa issue that was causing latency spikes





 

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

More
19 Jan 2026 09:28 #341571 by SrLange61
Replied by SrLange61 on topic Latency, error finishing read, and IRQ affinity
I’ve just updated to a Ali 7i92 with a Gecko540 on a old i3 pc, Plenty of ddr3 here. Running rt_setup allows the steppers to run smooth. Without it the motors appeared to be missing some steps. I had some problems running the script to find its a download error, dos2unix fixed the file to run as above. 
Thanks 
srl

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

More
28 Mar 2026 00:44 #344856 by rodw

Ran into an issue with IRQ balance after updating to trixie
 

Late to the party but currently best practice is not to use irqbalance. the balancing is now managed internally in the kernel so adding a second balancer can confuse things.... but it worked here....

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

Time to create page: 0.094 seconds
Powered by Kunena Forum