public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pekka Pietikainen <pp@evil.netppl.fi>
To: linux-kernel@vger.kernel.org
Subject: Re: [Question] Explanation of zero-copy networking
Date: Mon, 7 May 2001 21:30:48 +0300	[thread overview]
Message-ID: <20010507213048.A17014@netppl.fi> (raw)
In-Reply-To: <E14wlUi-0003WQ-00@the-village.bc.nu> <Pine.LNX.3.95.1010507121212.4256A-100000@chaos.analogic.com>
In-Reply-To: <Pine.LNX.3.95.1010507121212.4256A-100000@chaos.analogic.com>

On Mon, May 07, 2001 at 12:12:57PM -0400, Richard B. Johnson wrote:
> you can perform network speed tests using "lo", removing the network
> board from the speed test. You will note that the network speed, due
> to software, is over 10 times faster, 30 times on some machines) than
> when the hardware I/O is used. This shows that the network code, alone,
> cannot be improved very much to provide an improvement in throughput.
I'd say more like a factor of 2.

Socket bandwidth using localhost: 141.63 MB/sec
Socket bandwidth using 192.168.9.3: 74.79 MB/sec

(with the boxes being able to do ~= 100MB/s when the receiver CPU/mem
bandwidth isn't limiting things). So I have slow pIII/500 class machines
with fast networking. You could rerun the test with your favourite 
multi-gigabit network and latest 1.7GHz PC and still have a similar
ratio. Being on the bleeding edge isn't easy, and waiting for a few years
for faster hardware isn't a solution for everyone ;)

Zero-copy mostly helps against CPU use (where it'll make your heavily 
loaded server be able to serve a lot more connections), not so much against
bandwidth. The receiver will still run into problems with the copy it has to
do unless you do some very evil tricks like header-splitting+MMU tricks or
run protocols designed to be accelerated in hardware.

Not that zero-copy isn't problem-free. If your bus starts corrupting random
bits there's no way of really noticing it since the NIC happily 
creates a correct TCP checksum based on the corrupt data.
It's not like hardware engineers can be expected to design hardware
that works according to spec :)

Then there's the interrupt problem, which someone will have to solve 
before they start shipping 10gigE NICs that use 1500-byte frames, 850000
interrupts/s without mitigation. Wheeee!!!! 

-- 
Pekka Pietikainen

  parent reply	other threads:[~2001-05-07 18:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-07 13:43 [Question] Explanation of zero-copy networking Alexander Eichhorn
2001-05-07 13:56 ` Alan Cox
2001-05-07 16:12   ` Richard B. Johnson
2001-05-07 17:53     ` Francois Romieu
2001-05-07 18:00       ` Blue Lang
2001-05-07 18:25     ` dean gaudet
2001-05-07 19:54       ` Richard B. Johnson
2001-05-07 20:23         ` dean gaudet
2001-05-08 11:09         ` Bjorn Wesen
2001-05-08 17:30         ` Alexander Eichhorn
2001-05-09  9:56           ` Reto Baettig
2001-05-07 18:30     ` Pekka Pietikainen [this message]
2001-05-07 19:00       ` Venkatesh Ramamurthy
2001-05-08  7:18     ` Jamie Lokier
2001-05-09 15:13       ` Eric W. Biederman
2001-05-07 18:21   ` dean gaudet
2001-05-07 21:59     ` Alan Cox
2001-05-08 16:20       ` Jamie Lokier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010507213048.A17014@netppl.fi \
    --to=pp@evil.netppl.fi \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox