现象是新交付的机器网络中断只在cpu单个核心上,导致单核跑满,其它核心空闲,造成了资源浪费,性能上不去
绑定方法如下(假设网卡是eth0):sh set_irq_affinity -x local eth0IFACE CORE MASK -> FILE
=======================
eth0 0 1 -> /proc/irq/110/smp_affinity
eth0 0 1 -> /sys/class/net/eth0/queues/tx-0/xps_cpus
eth0 2 4 -> /proc/irq/111/smp_affinity
eth0 2 4 -> /sys/class/net/eth0/queues/tx-1/xps_cpus
eth0 4 10 -> /proc/irq/112/smp_affinity
eth0 4 10 -> /sys/class/net/eth0/queues/tx-2/xps_cpus
eth0 6 40 -> /proc/irq/113/smp_affinity
eth0 6 40 -> /sys/class/net/eth0/queues/tx-3/xps_cpus
eth0 8 100 -> /proc/irq/114/smp_affinity
eth0 8 100 -> /sys/class/net/eth0/queues/tx-4/xps_cpus
eth0 10 400 -> /proc/irq/115/smp_affinity
eth0 10 400 -> /sys/class/net/eth0/queues/tx-5/xps_cpus
eth0 12 1000 -> /proc/irq/116/smp_affinity
eth0 12 1000 -> /sys/class/net/eth0/queues/tx-6/xps_cpus
eth0 14 4000 -> /proc/irq/117/smp_affinity
eth0 14 4000 -> /sys/class/net/eth0/queues/tx-7/xps_cpus
eth0 16 10000 -> /proc/irq/118/smp_affinity
eth0 16 10000 -> /sys/class/net/eth0/queues/tx-8/xps_cpus
eth0 18 40000 -> /proc/irq/119/smp_affinity
eth0 18 40000 -> /sys/class/net/eth0/queues/tx-9/xps_cpus
eth0 20 100000 -> /proc/irq/120/smp_affinity
eth0 20 100000 -> /sys/class/net/eth0/queues/tx-10/xps_cpus
eth0 22 400000 -> /proc/irq/121/smp_affinity
eth0 22 400000 -> /sys/class/net/eth0/queues/tx-11/xps_cpus
eth0 0 1 -> /proc/irq/122/smp_affinity
eth0 0 1 -> /sys/class/net/eth0/queues/tx-0/xps_cpus
eth0 2 4 -> /proc/irq/123/smp_affinity
eth0 2 4 -> /sys/class/net/eth0/queues/tx-1/xps_cpus
eth0 4 10 -> /proc/irq/124/smp_affinity
eth0 4 10 -> /sys/class/net/eth0/queues/tx-2/xps_cpus
eth0 6 40 -> /proc/irq/125/smp_affinity
eth0 6 40 -> /sys/class/net/eth0/queues/tx-3/xps_cpus
eth0 8 100 -> /proc/irq/126/smp_affinity
eth0 8 100 -> /sys/class/net/eth0/queues/tx-4/xps_cpus
eth0 10 400 -> /proc/irq/127/smp_affinity
eth0 10 400 -> /sys/class/net/eth0/queues/tx-5/xps_cpus
eth0 12 1000 -> /proc/irq/128/smp_affinity
eth0 12 1000 -> /sys/class/net/eth0/queues/tx-6/xps_cpus
eth0 14 4000 -> /proc/irq/129/smp_affinity
eth0 14 4000 -> /sys/class/net/eth0/queues/tx-7/xps_cpus
eth0 16 10000 -> /proc/irq/130/smp_affinity
eth0 16 10000 -> /sys/class/net/eth0/queues/tx-8/xps_cpus
eth0 18 40000 -> /proc/irq/131/smp_affinity
eth0 18 40000 -> /sys/class/net/eth0/queues/tx-9/xps_cpus
eth0 20 100000 -> /proc/irq/132/smp_affinity
eth0 20 100000 -> /sys/class/net/eth0/queues/tx-10/xps_cpus
eth0 22 400000 -> /proc/irq/133/smp_affinity
eth0 22 400000 -> /sys/class/net/eth0/queues/tx-11/xps_cpus
将脚本加到开机自启动里就可以自动执行了,shell脚本下载见附件。
上传的附件:
set_irq_affinity
(大小:6.75K,下载次数:2)