numa架构,万兆网卡两个,挂载不同numa
[root@localhost ~]# lscpu
Architecture: x86_64NUMA node1 CPU(s): 22-43,66-87
[root@localhost ~]# cat /sys/class/net/eth4/device/numa_node
0
[root@localhost ~]# cat /sys/class/net/eth3/device/numa_node
1
[root@localhost ~]#
脚本,网卡的队列设置,数据包RSS分流
#!/bin/sh
service irqbalance stop;
ethtool -K eth3 ntuple on
ethtool -X eth3 equal 8
ethtool -N eth3 rx-flow-hash udp4 sdfn
ethtool -L eth3 combined 8
ethtool -K eth3 gro off
grep eth3 /proc/interrupts |awk '{print $1, $NF}'
ethtool -K eth4 ntuple on
ethtool -X eth4 equal 8
ethtool -N eth4 rx-flow-hash udp4 sdfn
ethtool -L eth4 combined 8
ethtool -K eth4 gro off
grep eth4 /proc/interrupts |awk '{print $1, $NF}'
echo 000000000000000000001 > /proc/irq/159/smp_affinity;
echo 000000000000000000002 > /proc/irq/160/smp_affinity;
echo 000000000000000000004 > /proc/irq/161/smp_affinity;
echo 000000000000000000008 > /proc/irq/162/smp_affinity;
echo 000000000000000000010 > /proc/irq/163/smp_affinity;
echo 000000000000000000020 > /proc/irq/164/smp_affinity;
echo 000000000000000000040 > /proc/irq/165/smp_affinity;
echo 000000000000000000080 > /proc/irq/166/smp_affinity;
echo 100000,00000000,00000000 > /proc/irq/223/smp_affinity;
echo 200000,00000000,00000000 > /proc/irq/224/smp_affinity;
echo 400000,00000000,00000000 > /proc/irq/225/smp_affinity;
echo 800000,00000000,00000000 > /proc/irq/226/smp_affinity;
echo 010000,00000000,00000000 > /proc/irq/227/smp_affinity;
echo 020000,00000000,00000000 > /proc/irq/228/smp_affinity;
echo 040000,00000000,00000000 > /proc/irq/229/smp_affinity;
echo 080000,00000000,00000000 > /proc/irq/230/smp_affinity;
cho "eth4 irq:"
for i in {159..166} ; do cat /proc/irq/$i/smp_affinity ; donefor i in {0..7} ; do cat /sys/class/net/eth3/queues/rx-$i/rps_cpus ; done
echo 000000,00000000,00000001 > /sys/class/net/eth4/queues/rx-0/rps_cpus
echo 000000,00000000,00000002 > /sys/class/net/eth4/queues/rx-1/rps_cpus
echo 000000,00000000,00000004 > /sys/class/net/eth4/queues/rx-2/rps_cpus
echo 000000,00000000,00000008 > /sys/class/net/eth4/queues/rx-3/rps_cpus
echo 000000,00000000,00000010 > /sys/class/net/eth4/queues/rx-4/rps_cpus
echo 000000,00000000,00000020 > /sys/class/net/eth4/queues/rx-5/rps_cpus
echo 000000,00000000,00000040 > /sys/class/net/eth4/queues/rx-6/rps_cpus
echo 000000,00000000,00000080 > /sys/class/net/eth4/queues/rx-7/rps_cpus
echo 000000,00000000,00000001 > /sys/class/net/eth4/queues/tx-0/xps_cpus
echo 000000,00000000,00000002 > /sys/class/net/eth4/queues/tx-1/xps_cpus
echo 000000,00000000,00000004 > /sys/class/net/eth4/queues/tx-2/xps_cpus
echo 000000,00000000,00000008 > /sys/class/net/eth4/queues/tx-3/xps_cpus
echo 000000,00000000,00000010 > /sys/class/net/eth4/queues/tx-4/xps_cpus
echo 000000,00000000,00000020 > /sys/class/net/eth4/queues/tx-5/xps_cpus
echo 000000,00000000,00000040 > /sys/class/net/eth4/queues/tx-6/xps_cpus
echo 000000,00000000,00000080 > /sys/class/net/eth4/queues/tx-7/xps_cpus
echo "eth4 rx-queue:"
for i in {0..7} ; do cat /sys/class/net/eth4/queues/rx-$i/rps_cpus ; done