Re: [tcpdump-workers] mmap consumes more CPU

2012-11-26 Thread Guy Harris
On Nov 26, 2012, at 12:58 PM, abhinav narain wrote: > @Guy, > Basically, I was adding my own header (instead of radiotap) in kernel and > processing it in userland with my own code. Basically I wrote my own pcap > for that. For your own radio header, what you'd need would be: your own

Re: [tcpdump-workers] mmap consumes more CPU

2012-11-26 Thread abhinav narain
@Guy, Basically, I was adding my own header (instead of radiotap) in kernel and processing it in userland with my own code. Basically I wrote my own pcap for that. Since, I did not get the performance, Now I have added extra fields in radiotap. But I still see high CPU usage. Its interesting that y

Re: [tcpdump-workers] mmap consumes more CPU

2012-11-18 Thread David Laight
> hi, > I just checked the two mechanism : > (1) Using mmap to fetch packets from kernel to userspace > (2) Using recvfrom() call to fetch packets > > I see top reports > (1) 34% memory 20% cpu usage > (2) 21% memory 7% cpu usage ! It is worth remembering that the cpu usage reported by top isn'

Re: [tcpdump-workers] mmap consumes more CPU

2012-11-11 Thread Guy Harris
On Nov 5, 2012, at 11:03 AM, abhinav narain wrote: > I just checked the two mechanism : > (1) Using mmap to fetch packets from kernel to userspace > (2) Using recvfrom() call to fetch packets > > I see top reports > (1) 34% memory 20% cpu usage > (2) 21% memory 7% cpu usage ! > > I wanted a p