1. 查看eth0网卡当前设置
ethtool -l eth0
输出:
Channel parameters for eth0:
Pre-set maximums:
RX: 0
TX: 0
Other: 1
Combined: 63
Current hardware settings:
RX: 0
TX: 0
Other: 1
Combined: 24
2. 设置网卡当前使用多队列
ethtool -L eth0 combined <N> N为要使能的队列数
3. 查看网卡对应的中断号
cat /proc/interrupts
4. 查看中断号对(例如24)应的cpu亲和性
cat /proc/irq/24/smp_affinity
输出:
0001
表示24号中断绑定在cpu0上了
5. 绑定中断号到某个cpu上,下面是把24号绑定到cpu1
echo 2 > /proc/irq/24/smp_affinity
网友评论