邏輯CPU個數
cat /proc/cpuinfo | grep "processor" | wc -l
cat /proc/interrupts
CPU0 CPU10: 168 0 IO-APIC-edge timer
1: 79 0 IO-APIC-edge i8042
4: 2 0 IO-APIC-edge
8: 1 0 IO-APIC-edge rtc0
9: 0 0 IO-APIC-fasteoi acpi
10: 302080 0 IO-APIC-fasteoi virtio0, eth0
11: 314 0 IO-APIC-fasteoi uhci_hcd:usb1, sym53c8xx, Intel 82801AA-ICH
12: 667 0 IO-APIC-edge i8042
14: 35182 0 IO-APIC-edge ata_piix
15: 3225 0 IO-APIC-edge ata_piix
NMI: 0 0 Non-maskable interrupts
LOC: 2361875 2546808 Local timer interrupts
SPU: 0 0 Spurious interrupts
PMI: 0 0 Performance monitoring interrupts
IWI: 0 0 IRQ work interrupts
RES: 23414 23637 Rescheduling interrupts
CAL: 48 21032 Function call interrupts
TLB: 2334 1823 TLB shootdowns
TRM: 0 0 Thermal event interrupts
THR: 0 0 Threshold APIC interrupts
MCE: 0 0 Machine check exceptions
MCP: 0 0 Machine check polls
可以看到
10: 302080 .................eth0
利用
cat /proc/irq/irq編號/smp_affinity
cat /proc/irq/10/smp_affinity
秀3表示用CPU0和CPU1 (2^0+2^1)
Binary HexCPU 0 0001 1
CPU 1 0010 2
CPU 2 0100 4
CPU 3 1000 8
利用
echo 3 > /proc/irq/10/smp_affinity有些網卡在開機啟動時要加上pci=nomsi的參數
也可裝上irqbalance
#yum install irqbalance
chkconfig--level 345 irqbalance on //開機啟動。
serviceirqbalance start
沒有留言:
張貼留言