9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Charles Forsyth <forsyth@terzarima.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] kfs performance
Date: Wed,  3 Mar 2004 08:52:46 +0000	[thread overview]
Message-ID: <72f57bf60029eba0ac90b0d179e174a9@terzarima.net> (raw)
In-Reply-To: <E1AyLzG-000DO5-LD@t40.swtch.com>

be sure that rwm is on too as well as dma.

>>freebsd is a bit more clever with its disk.  i'm surprised it's only
>>a factor of three.   fossil isn't any better in this regard, although
>>it does buffer more.

i'm not sure about current BSD or Linux come to that but in the past i found that
performance differences were often affected by the following as well:
	- not actually writing to the storage until much later
	- using most of memory as a big cache
the former isn't so good if you suddenly halt the machine (soft updates or no)
and the latter isn't so good if you need the memory for something else.
i suspect BSD does both.  of course, NOT doing them is unhelpful
if you're trying to write quickly.   furthermore, if you stop
the machine suddenly, clearly unwritten material won't be there
regardless whether you buffer a lot or a little (unless it has got heaps of NVRAM).
on PCs, i'd add `using the hardware effectively',
which plan 9 makes optional, presumably because rwm and dma might be
touchy on some chipsets(?).  don't know.
cache only helps reads?  not entirely: it means it can buffer that much
more before actually writing.

kfs is more diligent than the /sys/src/fs about forcing writes through
to disc.  that includes indirect blocks, i think, so all in all it will be
doing much more writing than either fs or BSD.  as rsc suggests that will also be in relatively
small amounts, although i'm not sure there's much difference with BSD there.
you could try switching that off to see what difference it makes.

to speed things up generally, you might also try
increasing the kfs cache if you've got lots of physical memory.
it uses 10% by default.  the -B option controls it.
bigger blocks help too.



  parent reply	other threads:[~2004-03-03  8:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-02 14:15 David Tolpin
2004-03-02 14:27 ` matt
2004-03-02 14:55 ` ron minnich
2004-03-02 15:34 ` gdiaz
2004-03-03  2:19 ` Russ Cox
2004-03-03  2:31   ` Jeff Sickel
2004-03-03  8:52   ` Charles Forsyth [this message]
2004-03-03  9:23     ` David Tolpin
2004-03-03 10:35     ` matt
2004-03-03  9:48   ` matt
2004-03-03  9:51     ` David Tolpin
2004-03-03 19:15     ` Russ Cox
2004-03-03 19:28       ` C H Forsyth

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=72f57bf60029eba0ac90b0d179e174a9@terzarima.net \
    --to=forsyth@terzarima.net \
    --cc=9fans@cse.psu.edu \
    /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).