mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* TSO and IPoIB performance degradation
@ 2006-03-06 22:34 Michael S. Tsirkin
  2006-03-06 22:40 ` David S. Miller
  2006-03-06 22:50 ` Stephen Hemminger
  0 siblings, 2 replies; 25+ messages in thread
From: Michael S. Tsirkin @ 2006-03-06 22:34 UTC (permalink / raw)
  To: netdev, openib-general, Linux Kernel Mailing List,
	David S. Miller, Matt Leininger

Hello, Dave!
As you might know, the TSO patches merged into mainline kernel
since 2.6.11 have hurt performance for the simple (non-TSO)
high-speed netdevice that is IPoIB driver.

This was discussed at length here
http://openib.org/pipermail/openib-general/2005-October/012271.html

I'm trying to figure out what can be done to improve the situation.
In partucular, I'm looking at the Super TSO patch
http://oss.sgi.com/archives/netdev/2005-05/msg00889.html

merged into mainline here

http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=314324121f9b94b2ca657a494cf2b9cb0e4a28cc

There, you said:

	When we do ucopy receive (ie. copying directly to userspace
	during tcp input processing) we attempt to delay the ACK
	until cleanup_rbuf() is invoked.  Most of the time this
	technique works very well, and we emit one ACK advertising
	the largest window.

	But this explodes if the ucopy prequeue is large enough.
	When the receiver is cpu limited and TSO frames are large,
	the receiver is inundated with ucopy processing, such that
	the ACK comes out very late.  Often, this is so late that
	by the time the sender gets the ACK the window has emptied
	too much to be kept full by the sender.

	The existing TSO code mostly avoided this by keeping the
	TSO packets no larger than 1/8 of the available window.
	But with the new code we can get much larger TSO frames.

So I'm trying to get a handle on it: could a solution be to simply
look at the frame size, and call tcp_send_delayed_ack from
if the frame size is no larger than 1/8?

Does this make sense?

Thanks,


-- 
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies

^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: [openib-general] Re: TSO and IPoIB performance degradation
@ 2006-03-08  1:17 Roland Dreier
  2006-03-08  1:23 ` David S. Miller
  0 siblings, 1 reply; 25+ messages in thread
From: Roland Dreier @ 2006-03-08  1:17 UTC (permalink / raw)
  To: David S. Miller
  Cc: mlleinin, netdev, linux-kernel, openib-general, shemminger

    David> How limited are the IPoIB devices, TX descriptor wise?

    David> One side effect of the TSO changes is that one extra
    David> descriptor will be used for outgoing packets.  This is
    David> because we have to put the headers as well as the user
    David> data, into page based buffers now.

We have essentially no limit on TX descriptors.  However I think
there's some confusion about TSO: IPoIB does _not_ do TSO -- generic
InfiniBand hardware does not have any TSO capability.  In the future
we might be able to implement TSO for certain hardware that does have
support, but even that requires some firmware help from the from the
HCA vendors, etc.  So right now the IPoIB driver does not do TSO.

The reason TSO comes up is that reverting the patch described below
helps (or helped at some point at least) IPoIB throughput quite a bit.
Clearly this was a bug fix so we can't revert it in general but I
think what Michael Tsirkin was suggesting at the beginning of this
thread is to do what the last paragraph of the changelog says -- find
some way to re-enable the trick.

diff-tree 3143241... (from e16fa6b...)
Author: David S. Miller <davem@davemloft.net>
Date:   Mon May 23 12:03:06 2005 -0700

    [TCP]: Fix stretch ACK performance killer when doing ucopy.

    When we are doing ucopy, we try to defer the ACK generation to
    cleanup_rbuf().  This works most of the time very well, but if the
    ucopy prequeue is large, this ACKing behavior kills performance.

    With TSO, it is possible to fill the prequeue so large that by the
    time the ACK is sent and gets back to the sender, most of the window
    has emptied of data and performance suffers significantly.

    This behavior does help in some cases, so we should think about
    re-enabling this trick in the future, using some kind of limit in
    order to avoid the bug case.

 - R.

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2006-04-27  4:13 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-06 22:34 TSO and IPoIB performance degradation Michael S. Tsirkin
2006-03-06 22:40 ` David S. Miller
2006-03-06 22:50 ` Stephen Hemminger
2006-03-08  1:17 [openib-general] " Roland Dreier
2006-03-08  1:23 ` David S. Miller
2006-03-08 12:53   ` Michael S. Tsirkin
2006-03-08 20:53     ` David S. Miller
2006-03-09 23:48     ` David S. Miller
2006-03-10  0:10       ` Michael S. Tsirkin
2006-03-10  0:38         ` Michael S. Tsirkin
2006-03-10  7:18         ` David S. Miller
2006-03-10  0:21       ` Rick Jones
2006-03-10  7:23         ` David S. Miller
2006-03-10 17:44           ` Rick Jones
2006-03-20  9:06           ` Michael S. Tsirkin
2006-03-20  9:55             ` David S. Miller
2006-03-20 10:22               ` Michael S. Tsirkin
2006-03-20 10:37                 ` David S. Miller
2006-03-20 11:27                   ` Michael S. Tsirkin
2006-03-20 11:47                     ` Arjan van de Ven
2006-03-20 11:49                       ` Lennert Buytenhek
2006-03-20 11:53                         ` Arjan van de Ven
2006-03-20 13:35                           ` Michael S. Tsirkin
2006-03-20 12:04                         ` Michael S. Tsirkin
2006-03-20 15:09                           ` Benjamin LaHaise
2006-03-20 18:58                             ` Rick Jones
2006-03-20 23:00                             ` David S. Miller
2006-04-27  4:13                   ` Troy Benjegerdes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome