From: Ingo Molnar <mingo@elte.hu>
To: "Stephen C. Tweedie" <sct@redhat.com>
Cc: Christoph Hellwig <hch@caldera.de>,
"David S. Miller" <davem@redhat.com>, <riel@conectiva.com.br>,
<netdev@oss.sgi.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PLEASE-TESTME] Zerocopy networking patch, 2.4.0-1
Date: Tue, 9 Jan 2001 17:16:40 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.30.0101091641180.4491-100000@e2> (raw)
In-Reply-To: <20010109152702.E9321@redhat.com>
On Tue, 9 Jan 2001, Stephen C. Tweedie wrote:
> > we do have SLAB [which essentially caches structures, on a per-CPU basis]
> > which i did take into account, but still, initializing a 600+ byte kiovec
> > is probably more work than the rest of sending a packet! I mean i'd love
> > to eliminate the 200+ bytes skb initialization as well, it shows up.
>
> Reusing a kiobuf for a request involves setting up the length, offset
> and maybe errno fields, and writing the struct page *'s into the
> maplist[]. Nothing more.
i'm talking about kiovecs not kiobufs (because those are equivalent to a
fragmented packet - every packet fragment can be anywhere). Initializing a
kiovec involves touching a dozen cachelines. Keeping structures compressed
is very important.
i dont know. I dont think it's necesserily bad for a subsystem to have its
own 'native structure' how it manages data.
> We've already got measurements showing how insane this is. Raw IO
> requests, plus internal pagebuf contiguous requests from XFS, have to
> get broken down into page-sized chunks by the current ll_rw_block()
> API, only to get reassembled by the make_request code. It's
> *enormous* overhead, and the kiobuf-based disk IO code demonstrates
> this clearly.
i do believe that you are wrong here. We did have a multi-page API between
sendfile and the TCP layer initially, and it made *absolutely no
performance difference*. But it was more complex, and harder to fix. And
we had to keep intelligent buffering/clustering/merging in any case,
because some native Linux interfaces such as write() and read() have byte
granularity.
so unless there is some fundamental difference between the two approaches,
i dont buy this argument. I dont necesserily say that your measurements
are wrong, i'm saying that the performance analysis is wrong.
> We have already shown that the IO-plugging API sucks, I'm afraid.
it might not be important to others, but we do hold one particular
SPECweb99 world record: on 2-way, 2 GB RAM, testing a load with a full
fileset of ~9 GB. It generates insane block-IO load, and we do beat other
OSs that have multipage support, including SGI. (and no, it's not due to
kernel-space acceleration alone this time - it's mostly due to very good
block-IO performance.) We use Jens Axobe's IO-batching fixes that
dramatically improve the block scheduler's performance under high load.
> > > and even in networking the 1.5K packet limit kills us in some cases
> > > and we need an interface capable of generating jumbograms.
> >
> > which cases?
>
> Gig Ethernet, [...]
we handle gigabit ethernet with 1.5K zero-copy packets just fine. One
thing people forget is IRQ throttling: when switching from 1500 byte
packets to 9000 byte packets then the amount of interrupts drops by a
factor of 6. Now if the tunings of a driver are not changed accordingly,
1500 byte MTU can show dramatically lower performance than 9000 byte MTU.
But if tuned properly, i see little difference between 1500 byte and 9000
byte MTU. (when using a good protocol such as TCP.)
> > nothing prevents the introduction of specialized interfaces - if they feel
> > like they can get enough traction.
>
> So you mean we'll introduce two separate APIs for general zero-copy,
> just to get around the problems in the single-page-based on?
no. But i think that none of the mainstream protocols or APIs mandate a
multi-page interface - i do think that the performance problems mentioned
were mis-analyzed. I'd call the multi-page API thing an urban legend.
Nobody in their right mind can claim that a series of function calls shows
any difference in *block IO* performance, compared to a multi-page API
(which has an additional vector-setup cost). Only functional differences
can explain any measured performance difference - and for those
merging/clustering bugs, multipage support is only a workaround.
> > I was talking about the normal Linux IO
> > APIs, read()/write()/sendfile(), which are byte granularity and invoke an
> > almost mandatory buffering/clustering mechanizm in every kernel subsystem
> > they deal with.
>
> Only tcp and ll_rw_block. ll_rw_block has already been fixed in the
> SGI patches, and gets _much_ better performance as a result. [...]
as mentioned above, i think this is not due to going multipage.
> The presence of terrible performance in the old ll_rw_block code is
> NOT a good excuse for perpetuating that model.
i'd like to measure this performance problem (because i'd like to
double-check it) - what measurement method was used?
Ingo
-
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/
next prev parent reply other threads:[~2001-01-09 16:17 UTC|newest]
Thread overview: 119+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-08 21:56 Jes Sorensen
2001-01-08 1:24 ` David S. Miller
2001-01-08 10:39 ` Christoph Hellwig
2001-01-08 10:34 ` David S. Miller
2001-01-08 18:05 ` Rik van Riel
2001-01-08 21:07 ` David S. Miller
2001-01-09 10:23 ` Ingo Molnar
2001-01-09 10:31 ` David S. Miller
2001-01-09 11:28 ` Christoph Hellwig
2001-01-09 12:04 ` Ingo Molnar
2001-01-09 14:25 ` Stephen C. Tweedie
2001-01-09 14:33 ` Alan Cox
2001-01-09 15:00 ` Ingo Molnar
2001-01-09 15:27 ` Stephen C. Tweedie
2001-01-09 16:16 ` Ingo Molnar [this message]
2001-01-09 16:37 ` Alan Cox
2001-01-09 16:48 ` Ingo Molnar
2001-01-09 17:29 ` Alan Cox
2001-01-09 17:38 ` Jens Axboe
2001-01-09 18:38 ` Ingo Molnar
2001-01-09 19:54 ` Andrea Arcangeli
2001-01-09 20:10 ` Ingo Molnar
2001-01-10 0:00 ` Andrea Arcangeli
2001-01-09 20:12 ` Jens Axboe
2001-01-09 23:20 ` Andrea Arcangeli
2001-01-09 23:34 ` Jens Axboe
2001-01-09 23:52 ` Andrea Arcangeli
2001-01-17 5:16 ` Rik van Riel
2001-01-09 17:56 ` Chris Evans
2001-01-09 18:41 ` Ingo Molnar
2001-01-09 22:58 ` [patch]: ac4 blk (was Re: [PLEASE-TESTME] Zerocopy networking patch, 2.4.0-1) Jens Axboe
2001-01-09 19:20 ` [PLEASE-TESTME] Zerocopy networking patch, 2.4.0-1 J Sloan
2001-01-09 18:10 ` Stephen C. Tweedie
2001-01-09 15:38 ` Benjamin C.R. LaHaise
2001-01-09 16:40 ` Ingo Molnar
2001-01-09 17:30 ` Benjamin C.R. LaHaise
2001-01-09 18:12 ` Stephen C. Tweedie
2001-01-09 18:35 ` Ingo Molnar
2001-01-09 17:53 ` Christoph Hellwig
2001-01-09 21:13 ` David S. Miller
2001-01-09 19:14 ` Linus Torvalds
2001-01-09 20:07 ` Ingo Molnar
2001-01-09 20:15 ` Linus Torvalds
2001-01-09 20:36 ` Christoph Hellwig
2001-01-09 20:55 ` Linus Torvalds
2001-01-09 21:12 ` Christoph Hellwig
2001-01-09 21:26 ` Linus Torvalds
2001-01-10 7:42 ` Christoph Hellwig
2001-01-10 8:05 ` Linus Torvalds
2001-01-10 8:33 ` Christoph Hellwig
2001-01-10 8:37 ` Andrew Morton
2001-01-10 23:32 ` Linus Torvalds
2001-01-19 15:55 ` Andrew Scott
2001-01-17 14:05 ` Rik van Riel
2001-01-18 0:53 ` Christoph Hellwig
2001-01-18 1:13 ` Linus Torvalds
2001-01-18 17:50 ` Christoph Hellwig
2001-01-18 18:04 ` Linus Torvalds
2001-01-18 21:12 ` Albert D. Cahalan
2001-01-19 1:52 ` 2.4.1-pre8 video/ohci1394 compile problem ebi4
2001-01-19 6:55 ` [PLEASE-TESTME] Zerocopy networking patch, 2.4.0-1 Linus Torvalds
2001-01-09 23:06 ` Benjamin C.R. LaHaise
2001-01-09 23:54 ` Linus Torvalds
2001-01-10 7:51 ` Gerd Knorr
2001-01-12 1:42 ` Stephen C. Tweedie
2001-01-09 11:42 ` David S. Miller
2001-01-09 10:31 ` Christoph Hellwig
2001-01-09 11:05 ` Ingo Molnar
2001-01-09 18:27 ` Christoph Hellwig
2001-01-09 19:19 ` Ingo Molnar
2001-01-09 14:18 ` Stephen C. Tweedie
2001-01-09 14:40 ` Ingo Molnar
2001-01-09 14:51 ` Alan Cox
2001-01-09 15:17 ` Stephen C. Tweedie
2001-01-09 15:37 ` Ingo Molnar
2001-01-09 22:25 ` Linus Torvalds
2001-01-10 15:21 ` Stephen C. Tweedie
2001-01-09 15:25 ` Stephen Frost
2001-01-09 15:40 ` Ingo Molnar
2001-01-09 15:48 ` Stephen Frost
2001-01-10 1:14 ` Dave Zarzycki
2001-01-10 1:14 ` David S. Miller
2001-01-10 2:18 ` Dave Zarzycki
2001-01-10 1:19 ` Ingo Molnar
2001-01-09 21:18 ` David S. Miller
2001-01-10 2:56 ` storage over IP (was Re: [PLEASE-TESTME] Zerocopy networking patch, 2.4.0-1) dean gaudet
2001-01-10 2:58 ` David S. Miller
2001-01-10 3:18 ` dean gaudet
2001-01-10 3:09 ` David S. Miller
2001-01-10 3:05 ` storage over IP (was Re: [PLEASE-TESTME] Zerocopy networking patch, Alan Cox
2001-01-08 21:48 ` [PLEASE-TESTME] Zerocopy networking patch, 2.4.0-1 David S. Miller
2001-01-08 22:32 ` Jes Sorensen
2001-01-08 22:37 ` David S. Miller
2001-01-08 22:43 ` Stephen Frost
2001-01-08 22:36 ` David S. Miller
2001-01-09 12:12 ` Ingo Molnar
2001-01-09 13:42 ` David S. Miller
2001-01-09 21:19 ` David S. Miller
2001-01-09 13:52 ` Trond Myklebust
2001-01-09 15:27 ` Trond Myklebust
2001-01-10 9:21 ` Trond Myklebust
2001-01-09 13:08 Stephen Landamore
2001-01-09 13:24 ` Ingo Molnar
2001-01-09 13:47 ` Andrew Morton
2001-01-09 19:15 ` Dan Hollis
2001-01-09 19:14 ` Dan Hollis
2001-01-09 22:03 ` David S. Miller
2001-01-09 22:58 ` Dan Hollis
2001-01-09 22:59 ` Ingo Molnar
2001-01-09 23:11 ` Dan Hollis
2001-01-10 3:24 ` Chris Wedgwood
2001-01-09 17:46 Manfred Spraul
2001-01-10 8:41 Manfred Spraul
2001-01-10 8:31 ` David S. Miller
2001-01-10 11:25 ` Ingo Molnar
2001-01-10 12:03 ` Manfred Spraul
2001-01-10 12:07 ` Ingo Molnar
2001-01-10 16:18 ` Jamie Lokier
2001-01-13 15:43 ` yodaiken
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=Pine.LNX.4.30.0101091641180.4491-100000@e2 \
--to=mingo@elte.hu \
--cc=davem@redhat.com \
--cc=hch@caldera.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.com \
--cc=riel@conectiva.com.br \
--cc=sct@redhat.com \
/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
all inboxes | Powered by JetHome®