[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1357575443.6919.3105.camel@edumazet-glaptop>
Date: Mon, 07 Jan 2013 08:17:23 -0800
From: Eric Dumazet <erdnetdev@...il.com>
To: Ian Campbell <Ian.Campbell@...rix.com>
Cc: Sander Eikelenboom <linux@...elenboom.it>,
Rick Jones <rick.jones2@...com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
annie li <annie.li@...cle.com>,
"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>
Subject: Re: [PATCH] xen/netfront: improve truesize tracking
On Mon, 2013-01-07 at 13:41 +0000, Ian Campbell wrote:
> > UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.1 (192.168.1.1) port 0 AF_INET : +/-2.500% @ 95% conf. : demo
> > Socket Message Elapsed Messages
> > Size Size Time Okay Errors Throughput
> > bytes bytes secs # # KBytes/sec
> >
> > current 212992 65507 60.00 252586 0 269305.73
> > current 2280 60.00 229371 244553.96
> > patched 212992 65507 60.00 256209 0 273168.32
> > patched 2280 60.00 201670 215019.54
>
> The recv numbers here aren't too pleasing either.
The number of packets that can be queued into UDP socket depends on
sk->sk_rcvbuf (SO_RCVBUF) and skb truesize.
So what we notice here are packet drops (netstat -s would give us the
total counters)
To absorb a burst of incoming messages, an application would have to set
an appropriate receive buffer.
In this case, RCVBUF value was set to a very minimum, basically not
allowing more than one queued packet.
TCP stack has a 'collapse' mode, which basically converts skbs in
receive queue (or ofo queue) to better filled ones (skb->len very close
to skb->truesize) when memory limits are about to be hit.
Its very expensive, as it adds one more copy stage, but it happens only
in rare circumstances. Of course, when a driver uses one page of 4096
bytes to store one 1514 bytes ethernet frame, it can happen more often.
netstat -s | grep collap
25292 packets collapsed in receive queue due to low socket buffer
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists