9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] chess?
Date: Sun,  5 Jan 2014 09:36:45 -0500	[thread overview]
Message-ID: <413bc7b7a183474c7405763c23674fe6@brasstown.quanstro.net> (raw)
In-Reply-To: <CAOEdRO3__ETq_8GKXnCupGXUujOdLHAHax871AV96+kS7Wa3zA@mail.gmail.com>

> Thanks, this is possibly a way, but, at least in my case, this takes ages...
> (Say it can run for >45 mins; maybe much more; I do not know the true
> reason why,
> but I intuitively suspect the protocol.)
> Therefore I asked for a more specific pointer.
> Also, generally, there should be a quicker way.

it's easy to blame the protocol.  but it's more than that.
0.  the i/o unit is just 8k, this means that directories like
/sys/src/9 take 2 or more round trips.  this is trivial to fix
by upping MAXRPC in devmnt.  i've uppted this to
56k + IOHDRSZ.  this makes a difference even when the
rtt is 50µs.

1.  (or 0a) the kernel won't issue more than one concurrent
rpc for the same request.

2.  find/du are single threaded, so they they take full rtt latency
on each syscall.

there's a small demonstration of 2 at the end of this email.

- erik

---
note that except for the fcp test, rtt dominates.  even 384kbps
is more than enough to keep up.  in fact, except for the fcp
test time_link0 * rtt_link0/rtt_link1 tracks pretty closely with
the actual result.  since link1 is dsl, keeping track of the actual
rtt could have reduced some of this error.

link0:
rtt ~ 32ms uplink/downlink ~ 100mbps/100mbps:

0.29u 0.37s 895.45r 	 rc -c find | grep chess  # status= find 7086421: errors|
0.03u 0.03s 68.77r 	 rc -c cp lsr /tmp && grep chess /tmp/lsr
.0.04u 0.10s 5.40r 	 rc -c fcp lsr /tmp && grep chess /tmp/lsr

link1:
rtt ~ 52ms uplink/downlink ~ .384mbps/1.5mbps
0.00u 0.00s 1468.26r 	 rc -c find | grep chess
0.00u 0.01s 131.03r 	 rc -c cp lsr /tmp && grep chess /tmp/lsr >/dev/null
0.00u 0.00s 33.61r 	 rc -c fcp lsr /tmp && grep chess /tmp/lsr >/dev/null



  parent reply	other threads:[~2014-01-05 14:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-05 10:37 Rudolf Sykora
2014-01-05 11:27 ` Conor Williams
2014-01-05 12:03   ` stevie
2014-01-05 12:08     ` Conor Williams
2014-01-05 12:25       ` stevie
2014-01-05 13:02   ` Rudolf Sykora
2014-01-05 13:12     ` stevie
2014-01-05 13:39       ` Rudolf Sykora
2014-01-05 14:33         ` stevie
2014-01-05 16:16       ` Rudolf Sykora
2014-01-05 16:47         ` Kurt H Maier
2014-01-05 14:36     ` erik quanstrom [this message]
2014-01-05 16:02       ` Rudolf Sykora
  -- strict thread matches above, loose matches on Subject: below --
2013-02-10 20:05 trebol

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=413bc7b7a183474c7405763c23674fe6@brasstown.quanstro.net \
    --to=quanstro@quanstro.net \
    --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).