9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Martijn Heil <m.heil375@gmail.com>
To: 9front@9front.org
Subject: [9front] devfs performance
Date: Sun, 16 Jan 2022 16:27:04 +0100	[thread overview]
Message-ID: <CA+61k5-nc7puBs_8ei3Fw-09oFq2vPtWWiQvU8Dxo_L3nSa+yQ@mail.gmail.com> (raw)

Hello,

Lately I've been playing around with devfs, doing block interleaving
on two identical USB 3.0 HDD's. I was expecting to have a bit more
throughput compared to using one of those disks, but when I measured
read throughput of the block-interleaved virtual device with tput, the
throughput was exactly the same as measured on a single disk.
The read throughput of a single disk as measured with tput is about 60
MiB/s, so I don't think this would saturate the USB 3.0 SuperSpeed
bus.

Taking a look at /sys/src/9/port/devfs.c, and especially interio() at
/sys/src/9/port/devfs.c:1134,
it seems that the internal read and write operations to the files that
make up the virtual device are done synchronously instead of
asynchronously like I (perhaps naively) expected.
As I understand it, it reads one block from the first file, and only
when that block is done reading it starts reading a block from the
other file, and so on.

I think my interpretation here is correct, but I'm not that familiar
with the kernel source, so is what I'm saying here indeed correct?

It might be worthwhile to optimize this so that it reads
asynchronously from the files that the virtual device is built from.
Is this possible? And how could we achieve this?

Thank you for your time
Martijn Heil
aka
ninjoh

             reply	other threads:[~2022-01-16 15:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-16 15:27 Martijn Heil [this message]
2022-01-17 15:27 ` [9front] " Martijn Heil
2022-01-19  2:37   ` ori
2022-01-19  7:51   ` Roberto E. Vargas Caballero

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=CA+61k5-nc7puBs_8ei3Fw-09oFq2vPtWWiQvU8Dxo_L3nSa+yQ@mail.gmail.com \
    --to=m.heil375@gmail.com \
    --cc=9front@9front.org \
    /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).