狮子的雄心,骆驼的耐力,孩子的执著!
分类: LINUX
2011-05-18 18:47:53
默认所有的中断处理都集中在cpu0 上,导致服务器负载过高的时候,cpu0 成了瓶颈,而其他cpu 却还闲着。 用chkconfig irqbalance on 把irqbalance 服务给打开,service irqbalance start
[也可以手工指定cpu处理网卡eth0的中断请求,本例eth0的中断号为90:
通过修改 /proc/irq/90/smp_affinity文件内的编号实现00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000040]
可以实现将硬中断处理均衡分布到多个cpu上处理。查看中断分布情况
cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7
0: 3970840969 0 0 0 0 0 0 0 IO-APIC-edge timer
1: 3 0 0 0 0 0 0 0 IO-APIC-edge i8042
8: 1 0 0 0 0 0 0 0 IO-APIC-edge rtc
9: 0 0 0 0 0 0 0 0 IO-APIC-level acpi
12: 4 0 0 0 0 0 0 0 IO-APIC-edge i8042
14: 47 0 0 0 0 0 0 0 IO-APIC-edge ide0
66: 23 0 0 0 0 0 0 0 IO-APIC-level ehci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb4
74: 0 0 0 0 0 0 0 0 IO-APIC-level uhci_hcd:usb3
82: 30363432 88 0 0 1218 0 0 0 IO-APIC-level megasas
90: 517951053 0 0 0 0 0 0 0 PCI-MSI eth0
NMI: 245717 159248 167267 165869 166226 180380 167116 184195
LOC: 3970871382 3970871333 3970871261 3970871144 3970871128 3970871057 3970870954 3970870878
ERR: 0
MIS: 0