9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bakul Shah <bakul+plan9@bitblocks.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] A simple experiment
Date: Thu, 29 Apr 2010 20:47:37 -0700	[thread overview]
Message-ID: <20100430034737.577235B81@mail.bitblocks.com> (raw)
In-Reply-To: Your message of "Thu, 29 Apr 2010 13:23:00 EDT." <fc79826ac40b633c895201470733cf2f@kw.quanstro.net>

On Thu, 29 Apr 2010 13:23:00 EDT erik quanstrom <quanstro@quanstro.net>  wrote:
> > > 9p, like aoe, is a ping-pong protocol.  each message requires an ack.
> > > therefore, the transport layer doesn't need flow control.
> >
> > Therefore, it is also not able to utilise bandwidth
> > effectively over longhaul links. As an example, US coast
> > to coast round trip time latency is about 100ms. Now consider
> > fcp. Each worker thread of fcp does 8K read/writes. Due to
> > pingponging, the *most* a thread can xfer coast to coast is
> > 80KBps (for 16 threads, 1.28MBps).  It is actually much worse
> > since each thread doesn't even overlap reads with writes.
>
> i think you are conflating a ping-pong protocol with the
> limitation of a single outstanding message.  there is no
> reason that one needs a 1:1 correspondence between threads
> and outstanding messages.  nor does the protocol inherently
> prohibit 1 write from becoming multiple messages.

What I am saying is that RPC (which is how 9p is mostly used)
has this inherent performance limitation due to latency.  To
get around that if you use multiple outstanding messages
(regardless of one per thread or many per thread), you *will*
require flow control or you run into problems -- imagine
having thousands of outstanding messages. Or imagine having a
low bandwidth link for fcp.  Fcp will hog the link, to the
detriment of other programs.  So on the high end fcp
throughput is limited 1.28MBps, on the low end it will hog
the link completey (unless your kernel implements some sort
of fair queuing)!  If you want to make optimum use of the
available bandwidth while adjusting to changing conditions
and not competely clog up the pipe, you need a feedback
mechanism and window opening algorithm ALA TCP or something.

And anyway why do all this in fcp or every other program that
needs streaming?  It should be factored out.

> > Short of a sliding window that is as large as the capacity of
> > the pipe, you can't expect to keep it full.  As usual one has
> > to trade off simplicity vs performance.
>
> i don't think so.  the only thing a sliding window gives you
> is < 1 ack per message sent.

If the sender->receiver pipe can hold N bytes and the sender
is streaming (that is, keeping the pipe full), the sender
*will* be ahead of the receiver by N bytes. So a *streaming*
protcol has to allow it to be N bytes ahead.

Even if you have one ack per message, in a sliding window of
N messages (or bytes), the sender is allowed to get ahead of
the receiver by upto N more messages (or bytes). Here I am
not concerned about in-order delivery (though typically
people assume this when they talk about sliding windows).

If you assume in-order delivery you can coalesce multiple
acks but that can be seen as an ack optimization (but then
either you throw away out of order deliveries or have to add
selective ack or something).



  reply	other threads:[~2010-04-30  3:47 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-27 17:38 ron minnich
2010-04-27 17:49 ` erik quanstrom
2010-04-27 18:05   ` Francisco J Ballesteros
2010-04-27 22:20   ` ron minnich
2010-04-27 22:22     ` erik quanstrom
2010-04-27 17:54 ` jake
2010-04-27 17:57   ` John Floren
2010-04-27 17:59     ` erik quanstrom
2010-04-27 18:35       ` John Floren
2010-04-27 18:56         ` Jorden M
2010-04-27 19:03         ` Skip Tavakkolian
2010-04-27 22:23           ` ron minnich
2010-04-28 11:51             ` Steve Simon
2010-04-28 13:18               ` Ethan Grammatikidis
2010-04-28 13:26                 ` erik quanstrom
2010-04-28 13:50                   ` Ethan Grammatikidis
2010-04-28 14:03                     ` erik quanstrom
2010-04-28 15:15                       ` Charles Forsyth
2010-04-28 13:20               ` erik quanstrom
2010-04-28 17:52               ` Tim Newsham
2010-04-28 17:57                 ` Tim Newsham
2010-04-28 18:00                 ` erik quanstrom
2010-04-28 18:42                   ` ron minnich
2010-04-28 19:06                     ` erik quanstrom
2010-04-28 19:40                       ` Russ Cox
2010-04-28 20:36                     ` Francisco J Ballesteros
2010-04-28 20:51                       ` ron minnich
2010-04-29 13:19                         ` Eric Van Hensbergen
2010-04-28 21:05                       ` EBo
2010-04-28 21:14                         ` ron minnich
2010-04-28 22:06                           ` EBo
2010-04-28 21:15                         ` Gorka Guardiola
2010-04-28 23:18                           ` [9fans] references/citations [was: A simple experiment] EBo
2010-04-28 21:18                       ` [9fans] A simple experiment Skip Tavakkolian
2010-04-28 23:04                         ` Francisco J Ballesteros
2010-04-29 12:40                     ` roger peppe
2010-04-29 12:54                       ` David Leimbach
2010-04-29 14:35                         ` erik quanstrom
2010-04-29 15:06                           ` David Leimbach
2010-04-29 15:24                             ` ron minnich
2010-04-29 15:34                             ` erik quanstrom
2010-04-29 16:06                               ` David Leimbach
2010-04-29 16:09                                 ` erik quanstrom
2010-04-29 17:08                               ` Bakul Shah
2010-04-29 17:20                                 ` ron minnich
2010-04-29 17:32                                   ` erik quanstrom
2010-04-30  2:30                                   ` Anthony Sorace
2010-04-30  4:27                                     ` erik quanstrom
2010-04-30 10:51                                     ` hiro
2010-04-30 14:46                                       ` Anthony Sorace
2010-04-29 17:23                                 ` erik quanstrom
2010-04-30  3:47                                   ` Bakul Shah [this message]
2010-04-30  5:01                                     ` erik quanstrom
2010-04-30 15:59                                       ` Bakul Shah
2010-04-30 16:13                                         ` erik quanstrom
2010-05-02 21:26                                           ` Bakul Shah
2010-04-29 18:52                               ` Lyndon Nerenberg
2010-04-29 19:03                                 ` erik quanstrom
2010-04-29 19:54                                   ` Skip Tavakkolian
2010-04-29 19:58                                     ` erik quanstrom
2010-04-29 20:25                                       ` erik quanstrom
2010-05-03 11:34                                   ` Akshat Kumar
2010-04-29 19:47                                 ` Skip Tavakkolian
2010-04-29 17:48                         ` Tim Newsham
2010-04-29 17:59                           ` David Leimbach
2010-04-29 18:41                             ` Skip Tavakkolian
2010-04-29 18:42                               ` David Leimbach
2010-04-29 19:48                                 ` Skip Tavakkolian
2010-04-29 19:44                         ` C H Forsyth
2010-04-29 19:58                           ` Skip Tavakkolian
2010-04-29 20:41                           ` David Leimbach
2010-04-29 14:22                       ` erik quanstrom
2010-04-29 14:36                         ` David Leimbach
2010-04-29 14:43                           ` erik quanstrom
2010-04-29 15:03                             ` David Leimbach
2010-04-29 15:16                               ` ron minnich
2010-04-29 15:25                                 ` Eric Van Hensbergen
2010-04-29 18:24                                   ` EBo
2010-04-29 15:06                             ` Gabriel Díaz
2010-04-29 20:32                               ` Christopher Nielsen
2010-04-29 20:40                                 ` erik quanstrom
2010-04-29 22:39                                   ` Christopher Nielsen
2010-04-29 20:45                                 ` hiro
2010-04-29 23:42                                 ` Derek Fawcus
2010-04-29 23:57                                   ` erik quanstrom
2010-04-30  9:44                                   ` Charles Forsyth
2010-04-29 15:18                       ` ron minnich
2010-04-27 22:21       ` ron minnich
2010-04-27 21:36 ` Federico G. Benavento
2010-04-27 21:54   ` EBo

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=20100430034737.577235B81@mail.bitblocks.com \
    --to=bakul+plan9@bitblocks.com \
    --cc=9fans@9fans.net \
    /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;
as well as URLs for NNTP newsgroup(s).