public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sendfile+zerocopy: fairly sexy (nothing to do with ECN)
@ 2001-01-27  5:45 Andrew Morton
  2001-01-27  6:20 ` Aaron Lehmann
                   ` (3 more replies)
  0 siblings, 4 replies; 59+ messages in thread
From: Andrew Morton @ 2001-01-27  5:45 UTC (permalink / raw)
  To: lkml, netdev@oss.sgi.com

(Please keep netdev copied, else Jamal will grump at you, and
 you don't want that).

I've whacked together some tools to measure TCP throughput
with both sendfile and read/write.  I've tested with and
without the zerocopy patch.

The CPU load figures are very accurate: the tool uses a `subtractive'
algorithm which measures how much CPU is left over by the networking
code, rather than trying to measure how much CPU load the networking
stuff actually takes, if you see what I mean.  This accounts accurately
for CPU load, interrupts, softirq processing, memory bandwidth utilisation
and cache pollution.

The client is a 650 MHz PIII.  The NIC is a 3CCFE575CT Cardbus 3com.
It supports Scatter/Gather and hardware checksums.  The NIC's interrupt
is shared with the Cardbus controller, so this will impact throughput
slightly.

The kernels which were tested were 2.4.1-pre10 with and without the
zerocopy patch.  We only look at client load (the TCP sender).

The link throughput was 11.5 mbytes/sec at all times (saturated 100baseT)

2.4.1-pre10-vanilla, using sendfile():          29.6% CPU
2.4.1-pre10-vanilla, using read()/write():      34.5% CPU

2.4.1-pre10+zercopy, using sendfile():          18.2% CPU
2.4.1-pre10+zercopy, using read()/write():      38.1% CPU

2.4.1-pre10+zercopy, using sendfile():          22.9% CPU    * hardware tx checksums disabled
2.4.1-pre10+zercopy, using read()/write():      39.2% CPU    * hardware tx checksums disabled


What can we conclude?

- sendfile is 10% cheaper than read()-then-write() on 2.4.1-pre10.

- sendfile() with the zerocopy patch is 40% cheaper than
  sendfile() without the zerocopy patch.

- hardware Tx checksums don't make much difference.  hmm...

Bear in mind that the 3c59x driver uses a one-interrupt-per-packet
algorithm.  Mitigation reduces this to 0.3 ints/packet.
So we're absorbing 4,500 interrupts/sec while processing
12,000 packets/sec.  gigE NICs do much better mitigation than
this and the relative benefits of zerocopy will be much higher
for these.  Hopefully Jamal can do some testing.

BTW: I could not reproduce Jamal's oops when sending large
files (2 gigs with sendfile()).

The test tool is, of course, documented [ :-)/2 ].  It's at

	http://www.uow.edu.au/~andrewm/linux/#zc

-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 59+ messages in thread
* RE: sendfile+zerocopy: fairly sexy (nothing to do with ECN)
@ 2001-01-29 16:16 Jonathan Earle
  2001-01-29 16:34 ` Antonin Kral
  0 siblings, 1 reply; 59+ messages in thread
From: Jonathan Earle @ 2001-01-29 16:16 UTC (permalink / raw)
  To: 'jamal', Andrew Morton; +Cc: lkml, netdev

> Throughput: 100Mbps is really nothing. Linux never had a problem with
> 4-500Mbps file serving. So throughput is an important number. so is
> end to end latency, but in file serving case, latency might 
> not be a big deal so ignore it.

If I try to route more than 40mbps (40% line utilization) through a 100mbps
port (tulip) on a 2.4.0-test kernel running on a pIII 500 (or higher)
system, not only does the performance drop to nearly 0, the system gets all
sluggish and unusable.  This is with or without Jamal's FF patches.

How are you managing to get such high throughput?

Jon
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 59+ messages in thread
* Re: sendfile+zerocopy: fairly sexy (nothing to do with ECN)
@ 2001-01-31  1:49 Bernd Eckenfels
  0 siblings, 0 replies; 59+ messages in thread
From: Bernd Eckenfels @ 2001-01-31  1:49 UTC (permalink / raw)
  To: linux-kernel

In article <20010131133123.A7875@metastasis.f00f.org> you wrote:
> On Tue, Jan 30, 2001 at 02:17:57PM -0800, David S. Miller wrote:

>     8.5MB/sec sounds like half-duplex 100baseT.

> No; I'm 100% its  FD; HD gives 40k/sec TCP because of collisions and
> such like.

>     Positive you are running at full duplex all the way to the
>     netapp, and if so how many switches sit between you and this
>     netapp?

> It's FD all the way (we hardwire everything to 100-FD and never trust
> auto-negotiate); I see no errors or such like anywhere.

> There are ... <pause> ... 3 switches between four switches in
> between, mostly linked via GE. I'm not sure if latency might be an
> issue here, is it was critical I can imagine 10 km of glass might be
> a problem but it's not _that_ far...

>   --cw

> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> Please read the FAQ at http://www.tux.org/lkml/



> -------------------------------------------------------------------------------
>    Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
>      Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
>                    Fragen zum Gateway -> newsmaster@inka.de.
> -------------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

end of thread, other threads:[~2001-02-05 18:51 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-27  5:45 sendfile+zerocopy: fairly sexy (nothing to do with ECN) Andrew Morton
2001-01-27  6:20 ` Aaron Lehmann
2001-01-27  8:19   ` Andrew Morton
2001-01-27 10:09     ` Ion Badulescu
2001-01-27 10:45       ` Andrew Morton
2001-01-30  6:00     ` David S. Miller
2001-01-30 12:44       ` Andrew Morton
2001-01-30 12:52         ` David S. Miller
2001-01-30 14:58           ` Andrew Morton
2001-01-30 17:49             ` Chris Wedgwood
2001-01-30 22:17               ` David S. Miller
2001-01-31  0:31                 ` Chris Wedgwood
2001-01-31  0:45                   ` David S. Miller
2001-01-30 22:28             ` David S. Miller
2001-01-30 23:34               ` Andrew Morton
2001-02-02 10:12       ` Andrew Morton
2001-02-02 12:14         ` Trond Myklebust
2001-02-02 17:51         ` David Lang
2001-02-02 22:46           ` David S. Miller
2001-02-02 22:57             ` David Lang
2001-02-02 23:09               ` David S. Miller
2001-02-02 23:13                 ` David Lang
2001-02-02 23:28                   ` Jeff Barrow
2001-02-02 23:31                   ` David S. Miller
2001-02-03  2:27               ` James Sutherland
2001-01-27 10:05 ` Ion Badulescu
2001-01-27 10:39   ` Andrew Morton
2001-01-27 12:49   ` jamal
2001-01-30  1:06     ` Ion Badulescu
2001-01-30  2:48       ` jamal
2001-01-30  3:26         ` Ion Badulescu
2001-01-31  0:53           ` Still not sexy! (Re: " jamal
2001-01-31  0:59             ` Ingo Molnar
2001-01-31  1:04               ` jamal
2001-01-31  1:14                 ` Ingo Molnar
2001-01-31  1:39                   ` jamal
2001-01-31 11:21                   ` Malcolm Beattie
2001-01-31 11:24                     ` Ingo Molnar
2001-01-31  1:10             ` Still not sexy! (Re: sendfile+zerocopy: fairly sexy (nothing to dowith ECN) Rick Jones
2001-01-31  1:45               ` jamal
2001-01-31  2:25                 ` Still not sexy! (Re: sendfile+zerocopy: fairly sexy (nothing todowith ECN) Rick Jones
2001-02-04 19:48                   ` jamal
2001-02-05  5:13                     ` David S. Miller
2001-02-05 18:51                     ` Rick Jones
2001-01-27 12:43 ` sendfile+zerocopy: fairly sexy (nothing to do with ECN) jamal
2001-01-27 13:29   ` Andrew Morton
2001-01-27 14:15     ` jamal
2001-01-28 16:05       ` Andrew Morton
2001-01-29 18:50   ` Rick Jones
     [not found] ` <200101271854.VAA02845@ms2.inr.ac.ru>
2001-01-28  5:34   ` Andrew Morton
2001-01-28 13:37     ` Felix von Leitner
2001-01-28 14:11       ` Dan Hollis
2001-01-28 14:27       ` Andi Kleen
2001-01-29 21:50         ` Pavel Machek
2001-01-28 19:43       ` Gregory Maxwell
2001-01-28 19:48       ` Choosing Linux NICs (was: Re: sendfile+zerocopy: fairly sexy (nothing to do with ECN)) Felix von Leitner
  -- strict thread matches above, loose matches on Subject: below --
2001-01-29 16:16 sendfile+zerocopy: fairly sexy (nothing to do with ECN) Jonathan Earle
2001-01-29 16:34 ` Antonin Kral
2001-01-31  1:49 Bernd Eckenfels

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