9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] 9p & read-ahead
@ 2003-07-31  8:29 steve.simon
  2003-07-31  8:37 ` boyd, rounin
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: steve.simon @ 2003-07-31  8:29 UTC (permalink / raw)
  To: 9fans

Hi,

I am thinking of adding read-ahead to a 9p server.
Is this a sensible thing to do? Am I being foolish
and indulging in bloatware or is it a sensible
optimisation?

My server is my Netware client. Directory scans of big
directrories is slow as is copying files. Looking at
iostats it looks like read is at fault. Netware
allows me to read big chunks of files and to scan for
multiple directory entries, So this is fairly easy,

I was planning to add a timeout on the buffer of
a seccond or two, so I don't get stale info.

Anyone any strong views about this?

-Steve


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

* Re: [9fans] 9p & read-ahead
  2003-07-31  8:29 [9fans] 9p & read-ahead steve.simon
@ 2003-07-31  8:37 ` boyd, rounin
  2003-07-31  9:44 ` Bruce Ellis
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: boyd, rounin @ 2003-07-31  8:37 UTC (permalink / raw)
  To: 9fans

> I am thinking of adding read-ahead to a 9p server.

why not, as long as it's simple.

trying to be too smart is a lost cause when it comes to caches etc ...



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

* Re: [9fans] 9p & read-ahead
  2003-07-31  8:29 [9fans] 9p & read-ahead steve.simon
  2003-07-31  8:37 ` boyd, rounin
@ 2003-07-31  9:44 ` Bruce Ellis
  2003-07-31  9:50   ` boyd, rounin
  2003-07-31 20:52   ` rog
  2003-07-31 11:27 ` [9fans] " Jim Choate
  2003-07-31 23:36 ` [9fans] " Geoff Collyer
  3 siblings, 2 replies; 9+ messages in thread
From: Bruce Ellis @ 2003-07-31  9:44 UTC (permalink / raw)
  To: 9fans

read-ahead is straightforward and has been done a few times under
different moons.  the server decides the policy and if gets it wrong
then you know who to blame.  write-ahead is more interesting and
has been done a few times (by pb and me at least) -  write-ahead
being an immediate Rwrite when you are the policy man.  (write errors
poison the chan so the next T* gets an Rerror.)  great for annoying
people by streaming video in the unix room.

brucee
----- Original Message -----
From: <steve.simon@snellwilcox.com>
To: <9fans@cse.psu.edu>
Sent: Thursday, July 31, 2003 6:29 PM
Subject: [9fans] 9p & read-ahead


> Hi,
>
> I am thinking of adding read-ahead to a 9p server.
> Is this a sensible thing to do? Am I being foolish
> and indulging in bloatware or is it a sensible
> optimisation?
 etc


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

* Re: [9fans] 9p & read-ahead
  2003-07-31  9:44 ` Bruce Ellis
@ 2003-07-31  9:50   ` boyd, rounin
  2003-07-31 20:52   ` rog
  1 sibling, 0 replies; 9+ messages in thread
From: boyd, rounin @ 2003-07-31  9:50 UTC (permalink / raw)
  To: 9fans

> read-ahead is straightforward ...

the MD driver ...



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

* [9fans] Re: 9p & read-ahead
  2003-07-31  8:29 [9fans] 9p & read-ahead steve.simon
  2003-07-31  8:37 ` boyd, rounin
  2003-07-31  9:44 ` Bruce Ellis
@ 2003-07-31 11:27 ` Jim Choate
  2003-07-31 15:07   ` splite
  2003-07-31 23:36 ` [9fans] " Geoff Collyer
  3 siblings, 1 reply; 9+ messages in thread
From: Jim Choate @ 2003-07-31 11:27 UTC (permalink / raw)
  To: 9fans


On Thu, 31 Jul 2003 steve.simon@snellwilcox.com wrote:

> Anyone any strong views about this?

Add a switch so that anyone who does in a negative way can turn it off.


 --
    ____________________________________________________________________

      We are all interested in the future for that is where you and I
      are going to spend the rest of our lives.

                              Criswell, "Plan 9 from Outer Space"

      ravage@ssz.com                            jchoate@open-forge.org
      www.ssz.com                               www.open-forge.org
    --------------------------------------------------------------------



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

* Re: [9fans] Re: 9p & read-ahead
  2003-07-31 11:27 ` [9fans] " Jim Choate
@ 2003-07-31 15:07   ` splite
  2003-07-31 16:04     ` Jack Johnson
  0 siblings, 1 reply; 9+ messages in thread
From: splite @ 2003-07-31 15:07 UTC (permalink / raw)
  To: 9fans

On Thu, Jul 31, 2003 at 06:27:24AM -0500, Jim Choate wrote:
>
> On Thu, 31 Jul 2003 steve.simon@snellwilcox.com wrote:
>
> > Anyone any strong views about this?
>
> Add a switch so that anyone who does in a negative way can turn it off.

And a light to indicate that it's on.

And a rheostat to control how much it reads ahead.


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

* Re: [9fans] Re: 9p & read-ahead
  2003-07-31 15:07   ` splite
@ 2003-07-31 16:04     ` Jack Johnson
  0 siblings, 0 replies; 9+ messages in thread
From: Jack Johnson @ 2003-07-31 16:04 UTC (permalink / raw)
  To: 9fans

splite@purdue.edu wrote:
> And a light to indicate that it's on.
>
> And a rheostat to control how much it reads ahead.

Thanks.  Now I'm envisioning big, black Nakamichi routers with giant
volume knobs for traffic shaping.

...and Monster Cable Cat5.

-Jack



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

* Re: [9fans] 9p & read-ahead
  2003-07-31  9:44 ` Bruce Ellis
  2003-07-31  9:50   ` boyd, rounin
@ 2003-07-31 20:52   ` rog
  1 sibling, 0 replies; 9+ messages in thread
From: rog @ 2003-07-31 20:52 UTC (permalink / raw)
  To: 9fans

> great for annoying people by streaming video in the unix room.

related to this, i wonder whether anyone is using the following
technique to get around RPC latency overheads when streaming data over
9p:

allow multiple readers on the stream, but honour the read offsets:
queue "future reads", and reply to them only when all the data up to
there has been read.

to use this, a client schedules multiple reads concurrently (making
sure that each reads at a consistent offset).

the nice thing about this is that it's invisible to a naive reader,
and works just the same on static files too; it also works for writing.

ideally a client that uses this could dynamically adapt the number of
reader processes according to the data transfer rate, but i'm not
quite sure of the best way to go about this.



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

* Re: [9fans] 9p & read-ahead
  2003-07-31  8:29 [9fans] 9p & read-ahead steve.simon
                   ` (2 preceding siblings ...)
  2003-07-31 11:27 ` [9fans] " Jim Choate
@ 2003-07-31 23:36 ` Geoff Collyer
  3 siblings, 0 replies; 9+ messages in thread
From: Geoff Collyer @ 2003-07-31 23:36 UTC (permalink / raw)
  To: 9fans

Ken's file server does read-ahead and write-behind, so there's good
solid precedent.



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

end of thread, other threads:[~2003-07-31 23:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-31  8:29 [9fans] 9p & read-ahead steve.simon
2003-07-31  8:37 ` boyd, rounin
2003-07-31  9:44 ` Bruce Ellis
2003-07-31  9:50   ` boyd, rounin
2003-07-31 20:52   ` rog
2003-07-31 11:27 ` [9fans] " Jim Choate
2003-07-31 15:07   ` splite
2003-07-31 16:04     ` Jack Johnson
2003-07-31 23:36 ` [9fans] " Geoff Collyer

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).