Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU isolation for NIC: goal is to reduce/prevent packet loss #10

Open
Vrolijk opened this issue May 27, 2024 · 0 comments
Open

CPU isolation for NIC: goal is to reduce/prevent packet loss #10

Vrolijk opened this issue May 27, 2024 · 0 comments

Comments

@Vrolijk
Copy link
Owner

Vrolijk commented May 27, 2024

work in progress:

isolate CPU cores
find your physical and virtual cores
lscpu --all --extended

Isolate the cores (numbers are all virtual cores bound to a physical)
sudo gedit /etc/default/grub
Find and modify : GRUB_CMDLINE_LINUX="isolcpus=1,3 nohz_full=1,3"
save and update Grub:
sudo update-grub

Assign IRQ to CPU. NOTE: need to be done after every reboot.
Find IRQ for enp1s0
grep enp1s0 /proc/interrupts

Bind IRQ to CPU core
echo 2 > /proc/irq/126/smp_affinity
more info about binding to CPU https://support.hpe.com/hpesc/public/docDisplay?docId=c01824714&docLocale=en_US

Stop and start the nic:

sudo ip link set enp1s0 down
sudo ip link set enp1s0 up

Monitor NIC: packetloss and memmory usage
watch -n0 tc -s qdisc show dev enp1s0
Monitor CPU and interupts > search for enp1s0
watch -n0 cat /proc/interrupts

Validate settings:
are the selected cores isolated:
cat /sys/devices/system/cpu/isolated
is the NIC bound to a specific core
cat /proc/irq/126/smp_affinity

research:

Do we need to stop the irqbalance service? stop when needed
sudo service irqbalance status
sudo service irqbalance stop

research values under cat /sys/class/net/enp1s0/queues/tx-0/

Vrolijk added a commit that referenced this issue May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant