tcpdump mailing list archives
Re: Secret of great tcpdump performance ..
From: Rick Jones <rick.jones2 () hp com>
Date: Wed, 23 Jan 2008 09:45:07 -0800
Michael Krueger wrote:
On Tue, 22 Jan 2008 19:47:24 +0100, Rick Jones <rick.jones2 () hp com> wrote:How many processors do you have, are interrupts from each NIC going to seperate processors/cores/whatever (show us the output of /proc/interrupts), and have you bound each tcpdump to its corresponding NICs interrupt CPU?I have a single CPU / dual core machine. I think you are right. All of the interrupts are going to a single core:lxvoipmon05:~/perftest # cat /proc/interrupts CPU0 CPU1 0: 113 168298887 IO-APIC-edge timer 7: 1 1 IO-APIC-edge parport0 8: 0 2 IO-APIC-edge rtc 9: 0 0 IO-APIC-level acpi 14: 0 6034770 IO-APIC-edge ide0 50: 0 75531924 IO-APIC-level libata, eth1 58: 0 848554 IO-APIC-level libata, ehci_hcd:usb1 66: 0 394 IO-APIC-level libata, ohci_hcd:usb2 74: 0 3 IO-APIC-level ohci1394 82: 0 79599257 IO-APIC-level eth0 177: 0 4140498 IO-APIC-level eth2 NMI: 0 0 LOC: 168325561 168325456 ERR: 0 MIS: 0This was without binding tcpdump to a specific CPU. Anyway, tcpdump was able to capture the traffic on both NICs without dropped packets. My own app almost immediatly reports dropped packets.What do I have to do so that interrupts are handled on both cores? Will the interrupts move with the process if I bind them to separate cores?
First, you make certain that there is no irqbalance daemon running. Then you do:
echo M > /proc/irq/N/smp_affinitywhere M is 1 << CPUnum (ie CPU0 would use 1, CPU1 would use 2, CPU2 would use 4 etc etc) and N is from the table above.
rick jones - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Secret of great tcpdump performance .. Michael Krueger (Jan 22)
- Re: Secret of great tcpdump performance .. Rick Jones (Jan 22)
- Re: Secret of great tcpdump performance .. Michael Krueger (Jan 23)
- Re: Secret of great tcpdump performance .. Rick Jones (Jan 23)
- Re: Secret of great tcpdump performance .. Michael Krueger (Jan 23)
- Re: Secret of great tcpdump performance .. Rick Jones (Jan 23)
- Re: Secret of great tcpdump performance .. Michael Krueger (Jan 23)
- Re: Secret of great tcpdump performance .. Rick Jones (Jan 22)