tcpdump mailing list archives

Re: Libpcap on VMWare


From: Dustin Spicuzza <dustin () virtualroadside com>
Date: Tue, 12 Jan 2010 22:05:56 -0500

Guy Harris wrote:
On Jan 12, 2010, at 1:42 PM, Dustin Spicuzza wrote:

I haven't used the mmap'ed ring buffer on VMWare, but we used a 2GB
buffer to allow us to read/process 500Mbps off two interfaces with zero
packet loss over the period of a few days.

32-bit or 64-bit kernel, and 32-bit or 64-bit application?  (My guess would be 64-bit, as a 2GB buffer would eat up 
half the address space, and I have the impression that the Linux kernel keeps userland in the same address space, 
rather than having separate kernel and user address spaces, so I'm not sure you could have a 2GB buffer with a 32-bit 
kernel, and possibly not with a 32-bit userland.)


64-bit kernel and application.

We also used pcap_dispatch()
to process 1024 packets at a time... so that helped a lot also.

When you say "1024 packets at a time", does that mean you pass 1024 as the cnt argument, so that it doesn't process 
*more* than 1024 packets at a time?  Does that work better than -1 (meaning "loop until you run out of packets")?

Yes, that was what I meant. We never tried -1. We're running single
threaded with a select loop for pcap on two devices and some network
communications, so we figured on the off chance that -1 would never
return (which I'm sure it would), using a number would be easier.

Dustin


-- 
Innovation is just a problem away

Attachment: signature.asc
Description: OpenPGP digital signature


Current thread: