Vitezslav Samel <vitezslav(a)samel.cz> writes:
On Sun, May 04, 2014 at 08:10:32PM +1200, Nikola Pajkovsky wrote:
> Vitezslav Samel <vitezslav(a)samel.cz> writes:
>
> > Main idea for this work is to minimize the work needed to be done
> > in packet_get(), which is the hottest path in the program.
> >
> > Cheers,
> > Vita
> >
> > Vitezslav Samel (7):
> > refactor struct pkt_hdr initialization
> > refactor pkt_cleanup()
> > packet_get(): optimize - move struct iovec
> > packet_get(): optimize - move struct sockaddr_ll
> > packet_get(): optimize - move struct msghdr
> > packet_get(): optimize - remove cache variables
> > pkt_hdr: make pkt_buf allocated from heap
> >
> > src/capture-pkt.c | 12 ++++++----
> > src/detstats.c | 10 ++++----
> > src/hostmon.c | 18 ++++++++------
> > src/ifstats.c | 8 ++++---
> > src/itrafmon.c | 12 ++++++----
> > src/othptab.c | 6 ++---
> > src/packet.c | 70 ++++++++++++++++++++++++++++++++++++++-----------------
> > src/packet.h | 30 +++++++-----------------
> > src/pktsize.c | 6 ++++-
> > src/serv.c | 6 +++--
> > 10 files changed, 105 insertions(+), 73 deletions(-)
>
> Hello,
>
> do you have any numbers, which can proof your optimization?
No. But these are first steps to minimize dropped packets count
(packets which are received by interface but not processed by recvmsg())
and to have recvmsg() replaced by packet mmap() (PACKET_RX_RING)
interface and to have multithreading support.
Replacing recvmsg() by mmap() with multithreading in ifstats()
decreases dropped packets counts from several thousands to tens packets
per second on my workloads.
That sounds promising. Looking forward to see the patch.
I have a patch which shows dropped packets count; do you think
this info should be displayed on any screen? Or is this only debugging
info which user should not bother about?
This is nice information for everybody, and if you can squeeze it
somewhere, would be fantastic.
Could you please send me just patch, which shows dropped packet count?
--
Nikola