9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: John Floren <slawmaster@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Inducing artificial latency
Date: Tue, 15 Jun 2010 18:43:02 -0400	[thread overview]
Message-ID: <AANLkTimwtDzAjYot7CzFo5HSmZu16kHKBXu7nKiKF-T1@mail.gmail.com> (raw)
In-Reply-To: <AANLkTing3XTTVuY3bwDEel3j_diMYn528OndH3an4-F2@mail.gmail.com>

On Tue, Jun 15, 2010 at 5:45 PM, Devon H. O'Dell <devon.odell@gmail.com> wrote:
> 2010/6/15 John Floren <slawmaster@gmail.com>:
>> I'm going to be doing some work with 9P and high-latency links this
>> summer and fall. I need to be able to test things over a high-latency
>> network, but since I may be modifying the kernel, running stuff on
>> e.g. mordor is not the best option. I have enough systems here to do
>> the tests, I just need to artificially add latency between them.
>>
>> I've come up with a basic idea, but before I go diving in I want to
>> run it by 9fans and get opinions. What I'm thinking is writing a
>> synthetic file system that will collect writes to /net; to simulate a
>> high-latency file copy, you would run this synthetic fs, then do "9fs
>> remote; cp /n/remote/somefile .". If it's a control message, that gets
>> sent to the file immediately, but if it's a data write, that data
>> actually gets held in a queue until some amount of time (say 50ms) has
>> passed, to simulate network lag. After that time is up, the fs writes
>> to the underlying file, the data goes out, etc.
>>
>> I have not really done any networking stuff or filesystems work on
>> Plan 9; thus far, I've confined myself to kernel work. I could be
>> completely mistaken about how 9P and networking behave, so I'm asking
>> for opinions and suggestions. For my part, I'm trying to find good
>> example filesystems to read (I've been looking at gpsfs, for
>> instance).
>
> This seems reasonable, but remember that you're only going to be able
> to simulate latency in one direction as far as the machine is
> concerned. So you'll want to have the same configuration on both
> machines, otherwise things will probably look weird. I'd recommend
> doing this at a lower level, perhaps introducing a short sleep in IP
> output so that the latency is consistent across all requests. And of
> course both machines would need to have this configuration. You could
> have the stack export another file that you can tune if you want to
> maintain a file-system approach. But I think a synthetic FS for this
> is overkill.
>

My plan was to have each side running the fs. I had thought about
sticking a sleep in the kernel's ip code right before it writes to the
device, but since I planned on netbooting the test systems (so much
easier to bring in a new kernel), I thought it might be advantageous
to only slow down for one process. I suppose I could make it sleep
conditionally, like make the process write to a ctl file if it wants
latency, then sleep only for that pid and its children.


John
--
"With MPI, familiarity breeds contempt. Contempt and nausea. Contempt,
nausea, and fear. Contempt, nausea, fear, and .." -- Ron Minnich



  reply	other threads:[~2010-06-15 22:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-15 21:29 John Floren
2010-06-15 21:39 ` Jorden M
2010-06-15 22:06   ` Enrique Soriano
2010-06-15 21:39 ` erik quanstrom
2010-06-15 21:53   ` David Leimbach
2010-06-15 21:59     ` erik quanstrom
2010-06-15 21:45 ` Devon H. O'Dell
2010-06-15 22:43   ` John Floren [this message]
2010-06-15 23:01     ` Devon H. O'Dell
2010-06-16 19:04   ` John Floren
2010-06-16 22:15     ` Francisco J Ballesteros
2010-06-16 22:31       ` erik quanstrom
2010-06-16 22:58         ` EBo
2010-06-16 23:43         ` Bakul Shah
2010-06-17  0:10           ` erik quanstrom
2010-06-17  2:02             ` Bakul Shah
2010-06-17  3:32               ` erik quanstrom
2010-06-15 21:58 ` Gorka Guardiola
2010-06-15 22:07   ` erik quanstrom
2010-06-15 22:14     ` Gorka Guardiola
2010-06-22 14:53       ` John Floren
2010-06-22 15:03         ` John Floren
2010-06-16  5:20 ` Skip Tavakkolian

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=AANLkTimwtDzAjYot7CzFo5HSmZu16kHKBXu7nKiKF-T1@mail.gmail.com \
    --to=slawmaster@gmail.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).