netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 0/9 Rev3] Implement batching skb API and support in IPoIB
@ 2007-08-17  6:06 Krishna Kumar2
  2007-08-21  7:18 ` David Miller
  0 siblings, 1 reply; 44+ messages in thread
From: Krishna Kumar2 @ 2007-08-17  6:06 UTC (permalink / raw)
  To: David Miller
  Cc: gaagaan, general, hadi, herbert, jagana, jeff, johnpol, kaber,
	kumarkr, mcarlson, mchan, netdev, peter.p.waskiewicz.jr, rdreier,
	rick.jones2, Robert.Olsson, shemminger, sri, tgraf, xma


Hi Dave,

> I ran 3 iterations of 45 sec tests (total 1 hour 16 min, but I will
> run a longer one tonight). The results are (results in KB/s, and %):

I ran a 8.5 hours run with no batching + another 8.5 hours run with
batching (Buffer sizes: "32 128 512 4096 16384", Threads: "1 8 32",
Each test run time: 3 minutes, Iterations to average: 5). TCP seems
to get a small improvement.

Thanks,

- KK

-------------------------------------------------------------------------------
                           TCP
                        -----------
Size:32 Procs:1             3415       3321       -2.75
Size:128 Procs:1           13094      13388      2.24
Size:512 Procs:1            49037      50683      3.35
Size:4096 Procs:1          114646     114619     -.02
Size:16384 Procs:1        114626     114644     .01

Size:32 Procs:8             22675      22633      -.18
Size:128 Procs:8            77994      77297      -.89
Size:512 Procs:8            114716     114711     0
Size:4096 Procs:8          114637     114636     0
Size:16384 Procs:8         95814      114638     19.64

Size:32 Procs:32            23240      23349      .46
Size:128 Procs:32          82284      82247      -.04
Size:512 Procs:32          114885     114769     -.10
Size:4096 Procs:32         95735      114634     19.74
Size:16384 Procs:32       114736     114641     -.08

Average:                        1151534    1190210    3.36%
-------------------------------------------------------------------------------
                        No Delay:
                        ---------
Size:32 Procs:1             3002       2873       -4.29
Size:128 Procs:1           11853      11801      -.43
Size:512 Procs:1           45565      45837      .59
Size:4096 Procs:1         114511     114485     -.02
Size:16384 Procs:1        114521     114555     .02

Size:32 Procs:8             8026       8029       .03
Size:128 Procs:8           31589      31573      -.05
Size:512 Procs:8           111506     105766     -5.14
Size:4096 Procs:8         114455     114454     0
Size:16384 Procs:8        95833      114491     19.46

Size:32 Procs:32            8005       8027       .27
Size:128 Procs:32          31475      31505      .09
Size:512 Procs:32          114558     113687     -.76
Size:4096 Procs:32        114784     114447     -.29
Size:16384 Procs:32       114719     114496     -.19

Average:                         1046026    1034402    -1.11%
-------------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 44+ messages in thread
[parent not found: <20070828.215150.98552996.davem@davemloft.net>]
* Re: [PATCH 0/9 Rev3] Implement batching skb API and support in IPoIB
@ 2007-08-14  9:39 Krishna Kumar2
  0 siblings, 0 replies; 44+ messages in thread
From: Krishna Kumar2 @ 2007-08-14  9:39 UTC (permalink / raw)
  To: David Miller
  Cc: gaagaan, general, hadi, herbert, jagana, jeff, johnpol, kaber,
	kumarkr, mcarlson, mchan, netdev, peter.p.waskiewicz.jr, rdreier,
	rick.jones2, Robert.Olsson, shemminger, sri, tgraf, xma


Forgot to mention one thing:

> This fix reduced
> retransmissions from 180,000 to 55,000 or so. When I changed IPoIB
> driver to use iterative sends of each skb instead of creating multiple
> Work Request's, that number went down to 15].

This also reduced TCP No Delay performance from huge percentages like
200-400% and now is almost the same as original code. So fixing this
problem in IPoIB (driver?) will enable to use the multiple Work Request
& Work Completion, rather than limiting batching to single WR/WC.

thanks,

- KK


__________________

Hi Dave,

David Miller <davem@davemloft.net> wrote on 08/08/2007 04:19:00 PM:

> From: Krishna Kumar <krkumar2@in.ibm.com>
> Date: Wed, 08 Aug 2007 15:01:14 +0530
>
> > RESULTS: The performance improvement for TCP No Delay is in the range
of -8%
> >    to 320% (with -8% being the sole negative), with many individual
tests
> >    giving 50% or more improvement (I think it is to do with the hw
slots
> >    getting full quicker resulting in more batching when the queue gets
> >    woken). The results for TCP is in the range of -11% to 93%, with
most
> >    of the tests (8/12) giving improvements.
>
> Not because I think it obviates your work, but rather because I'm
> curious, could you test a TSO-in-hardware driver converted to
> batching and see how TSO alone compares to batching for a pure
> TCP workload?
>
> I personally don't think it will help for that case at all as
> TSO likely does better job of coalescing the work _and_ reducing
> bus traffic as well as work in the TCP stack.

I used E1000 (guess the choice is OK as e1000_tso returns TRUE. My
hw is 82547GI).

You are right, it doesn't help TSO case at all (infact degrades). Two
things to note though:
      - E1000 may not be suitable for adding batching (which is no
        longer a new API, as I have changed it already).
      - Small skbs where TSO doesn't come into picture still seems to
        improve. A couple of cases for large skbs did result in some
        improved (like 4K, TCP No Delay, 32 procs).

[Total segments retransmission for original code test run: 2220 & for
new code test run: 1620. So the retransmission problem that I was
getting seems to be an IPoIB bug, though I did have to fix one bug
in my networking component where I was calling qdisc_run(NULL) for
regular xmit path and change to always use batching. The problem is
that skb1 - skb10 may be present in the queue after each of them
failed to be sent out, then net_tx_action fires which batches all of
these into the blist and tries to send them out again, which also
fails (eg tx lock fail or queue full), then the next single skb xmit
will send the latest skb ignoring the 10 skbs that are already waiting
in the batching list. These 10 skbs are sent out only the next time
net_tx_action is called, so out of order skbs result. This fix reduced
retransmissions from 180,000 to 55,000 or so. When I changed IPoIB
driver to use iterative sends of each skb instead of creating multiple
Work Request's, that number went down to 15].

I ran 3 iterations of 45 sec tests (total 1 hour 16 min, but I will
run a longer one tonight). The results are (results in KB/s, and %):

Test Case                      Org BW       New BW      % Change

                              TCP
                            --------
Size:32 Procs:1                 1848        3918        112.01
Size:32 Procs:8                 21888       21555       -1.52
Size:32 Procs:32                19317       22433       16.13

Size:256 Procs:1                15584       25991       66.78
Size:256 Procs:8                110937      74565       -32.78
Size:256 Procs:32               105767      98967       -6.42

Size:4096 Procs:1               81910       96073       17.29
Size:4096 Procs:8               113302      94040       -17.00
Size:4096 Procs:32              109664      105522      -3.77

                            TCP No Delay:
                            --------------
Size:32 Procs:1                 2688        3177        18.19
Size:32 Procs:8                 6568        10588       61.20
Size:32 Procs:32                6573        7838        19.24

Size:256 Procs:1                7869        12724       61.69
Size:256 Procs:8                65652       45652       -30.46
Size:256 Procs:32               95114       112279      18.04

Size:4096 Procs:1               95302       84664       -11.16
Size:4096 Procs:8               111119      89111       -19.80
Size:4096 Procs:32              109249      113919      4.27

I will submit Rev4 with suggested changes (including single merged
API) on Thursday after some more testing.

Thanks,

- KK

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 44+ messages in thread
* [ofa-general] Re: [PATCH 0/9 Rev3] Implement batching skb API and support in IPoIB
  2007-08-08 11:09 ` Krishna Kumar2
@ 2007-08-08 22:01 David Miller
  2007-08-09  4:19 ` Krishna Kumar2
  -1 siblings, 1 reply; 44+ messages in thread
From: David Miller @ 2007-08-08 22:01 UTC (permalink / raw)
  To: krkumar2
  Cc: jagana, johnpol, gaagaan, jeff, Robert.Olsson, kumarkr, rdreier,
	peter.p.waskiewicz.jr, hadi, mcarlson, netdev, general, mchan,
	tgraf, sri, shemminger, kaber, herbert

From: Krishna Kumar2 <krkumar2@in.ibm.com>
Date: Wed, 8 Aug 2007 16:39:47 +0530

> What do you generally think of the patch/implementation ? :)

We have two driver implementation paths on recieve and now
we'll have two on send, and that's not a good trend.

In an ideal world all the drivers would be NAPI and netif_rx()
would only be used by tunneling drivers and similar in the
protocol layers.  And likewise all sends would go through
->hard_start_xmit().

If you can come up with a long term strategy that gets rid of
the special transmit method, that'd be great.

We should make Linux network drivers easy to write, not more difficult
by constantly adding most interfaces than we consolidate.

^ permalink raw reply	[flat|nested] 44+ messages in thread
* [ofa-general] Re: [PATCH 0/9 Rev3] Implement batching skb API and support in IPoIB
  2007-08-08 10:49 [ofa-general] " David Miller
@ 2007-08-08 13:42 Herbert Xu
  2007-08-09  0:06 ` Shirley Ma
  0 siblings, 1 reply; 44+ messages in thread
From: Herbert Xu @ 2007-08-08 13:42 UTC (permalink / raw)
  To: David Miller
  Cc: johnpol, peter.p.waskiewicz.jr, jeff, gaagaan, Robert.Olsson,
	kumarkr, rdreier, mcarlson, jagana, hadi, general, mchan, tgraf,
	netdev, shemminger, kaber, sri

On Wed, Aug 08, 2007 at 03:49:00AM -0700, David Miller wrote:
> 
> Not because I think it obviates your work, but rather because I'm
> curious, could you test a TSO-in-hardware driver converted to
> batching and see how TSO alone compares to batching for a pure
> TCP workload?

You could even lower the bar by disabling TSO and enabling
software GSO.

> I personally don't think it will help for that case at all as
> TSO likely does better job of coalescing the work _and_ reducing
> bus traffic as well as work in the TCP stack.

I agree.  I suspect the bulk of the effort is in getting
these skb's created and processed by the stack so that by
the time that they're exiting the qdisc there's not much
to be saved anymore.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 44+ messages in thread
* [ofa-general] Re: [PATCH 0/9 Rev3] Implement batching skb API and support in IPoIB
@ 2007-08-08 10:49 David Miller
  2007-08-08 11:09 ` Krishna Kumar2
  0 siblings, 1 reply; 44+ messages in thread
From: David Miller @ 2007-08-08 10:49 UTC (permalink / raw)
  To: krkumar2
  Cc: johnpol, jagana, peter.p.waskiewicz.jr, herbert, gaagaan,
	Robert.Olsson, kumarkr, rdreier, mcarlson, jeff, hadi, general,
	mchan, tgraf, netdev, shemminger, kaber, sri

From: Krishna Kumar <krkumar2@in.ibm.com>
Date: Wed, 08 Aug 2007 15:01:14 +0530

> RESULTS: The performance improvement for TCP No Delay is in the range of -8%
> 	to 320% (with -8% being the sole negative), with many individual tests
> 	giving 50% or more improvement (I think it is to do with the hw slots
> 	getting full quicker resulting in more batching when the queue gets
> 	woken). The results for TCP is in the range of -11% to 93%, with most
> 	of the tests (8/12) giving improvements.

Not because I think it obviates your work, but rather because I'm
curious, could you test a TSO-in-hardware driver converted to
batching and see how TSO alone compares to batching for a pure
TCP workload?

I personally don't think it will help for that case at all as
TSO likely does better job of coalescing the work _and_ reducing
bus traffic as well as work in the TCP stack.

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

end of thread, other threads:[~2007-09-14 17:25 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-17  6:06 [PATCH 0/9 Rev3] Implement batching skb API and support in IPoIB Krishna Kumar2
2007-08-21  7:18 ` David Miller
2007-08-21 12:30   ` [ofa-general] " jamal
2007-08-21 18:51     ` David Miller
2007-08-21 21:09       ` jamal
2007-08-21 22:50         ` David Miller
2007-08-22  4:11       ` [ofa-general] " Krishna Kumar2
2007-08-22  4:22         ` David Miller
2007-08-22  7:03           ` Krishna Kumar2
2007-08-22  9:14             ` David Miller
2007-08-23  2:43               ` Krishna Kumar2
2007-08-22 17:09           ` [ofa-general] " Rick Jones
2007-08-22 20:21             ` David Miller
2007-08-23 22:04               ` [ofa-general] " jamal
2007-08-23 22:25                 ` jamal
2007-08-23 22:35                   ` [ofa-general] " Rick Jones
2007-08-23 22:41                     ` jamal
2007-08-24  3:18                     ` Bill Fink
2007-08-24 12:14                       ` jamal
2007-08-24 18:08                         ` Bill Fink
2007-08-24 21:25                         ` David Miller
2007-08-24 23:11                           ` Herbert Xu
2007-08-25 23:45                             ` Bill Fink
2007-08-24 18:46                       ` [ofa-general] " Rick Jones
2007-08-25  0:42                       ` John Heffner
2007-08-26  8:41                         ` [ofa-general] " Bill Fink
2007-08-27  1:32                           ` John Heffner
2007-08-27  2:04                             ` David Miller
2007-08-27 23:23                               ` jamal
2007-09-14  7:20                                 ` [ofa-general] " Bill Fink
2007-09-14 13:44                                   ` TSO, TCP Cong control etc jamal
2007-09-14 17:24                                   ` [PATCH 0/9 Rev3] Implement batching skb API and support in IPoIB David Miller
2007-08-23 22:30                 ` David Miller
2007-08-23 22:38                   ` [ofa-general] " jamal
2007-08-24  3:34                     ` Stephen Hemminger
2007-08-24 12:36                       ` jamal
2007-08-24 16:25                       ` Rick Jones
     [not found] <20070828.215150.98552996.davem@davemloft.net>
     [not found] ` <OF46DAD75A.5ADE5863-ON65257346.001C9AA3-65257346.001CB0F4@in.ibm.com>
     [not found]   ` <20070828.221448.123919361.davem@davemloft.net>
2007-08-29 16:43     ` Waskiewicz Jr, Peter P
2007-09-03  9:21 ` Krishna Kumar2
  -- strict thread matches above, loose matches on Subject: below --
2007-08-14  9:39 Krishna Kumar2
2007-08-08 22:01 [ofa-general] " David Miller
2007-08-09  4:19 ` Krishna Kumar2
2007-08-09  4:27   ` David Miller
2007-08-09  6:26     ` Krishna Kumar2
2007-08-08 13:42 [ofa-general] " Herbert Xu
2007-08-09  0:06 ` Shirley Ma
2007-08-08 10:49 [ofa-general] " David Miller
2007-08-08 11:09 ` Krishna Kumar2

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).