9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <rsc@swtch.com>
To: corey@bitworthy.net,
	Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] how to fix: 'arena arenas00 creation time after last write time'
Date: Wed, 29 Jul 2009 07:48:54 -0700	[thread overview]
Message-ID: <dd6fe68a0907290748u51fe8fd2q139b1a87603032c7@mail.gmail.com> (raw)
In-Reply-To: <200907282124.01673.corey@bitworthy.net>

> The problem isn't confined to unnecessary warning messages
> being printed.
>
> What about the 'arena arenas00: header is out-of-date' error,
> and the subsequent re-indexing (on every reboot) which occurs
> as a result of the condition?

Despite the mention of "date" in the message,
the logic behind that print is not time-sensitive.
It's a different issue.

How many clumps does it say it is indexing?
How long does that take?  It shouldn't be too long.

Venti writes data blocks (clumps) to an append-only log.
Then it does two more bookkeeping steps so it
can find the data later.  The first step is to update
the block count in the arena header.  The second step
is to record an index entry for the block in the index disk
and then update the indexed block count in the arena header.
The data is committed once it is written to the log:
the bookkeeping is just an optimization.  The fact that
you are getting the "out-of-date" print means that the
first step has not happened for at least one block:
venti looked ahead and found more data blocks than
the header led it to expect.  That's fine, it just means
that venti was behind in its bookkeeping when you
shut it down.  (fshalt makes sure that the data is on
disk; it doesn't wait around for the bookkeeping.)
The next message you saw--indexing %d clumps--means
that the second step hadn't happened for a perhaps
larger number of blocks.  Indexing here means loading
information about the blocks into venti's in-memory
cache, so that lookups for the blocks will succeed.
If you leave the machine up long enough, venti will update
the on-disk index slowly, in the background.

If the pause at boot time due to this bookkeeping is
bothering you, you can flush the current venti state
to disk by running
    hget http://localhost:8000/flushdcache
    hget http://localhost:8000/flushicache    # can take a while
    hget http://localhost:8000/flushdcache
but replace localhost:8000 with your venti server's
HTTP address (maybe that's the right one; I don't know).

The fact that this is happening repeatedly suggests
that fossil is trying to do a dump to venti but you are not
leaving the machine up long enough that it can complete,
so every time you reboot, it starts writing blocks to venti
again, causing new indexing work that doesn't finish before
you reboot again.

If you want to end this cycle, the thing to do is let fossil
finish its archive and let venti finish indexing it.
If you run
    hget http://localhost:8000/storage
one if the numbers is the total number of clumps written to
the entire venti server.  If you wait a minute and run it again
and the number is growing, then fossil is writing to venti.
Let it run until the number stops growing, and then wait for
the venti flush above.

> What I do know is that I'm having real and present issues with
> venti, that are in some direct or indirect way related to at least
> one or more of the following actors:
>
> bios/rtc clock
> /env/timezone
> /dev/rtc
> aux/timesync

Again, if you've commented out the "creation time" print,
then your remaining issues are not clock-related.
I think you're just rebooting more often than usual.

Russ


  parent reply	other threads:[~2009-07-29 14:48 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <664879e97485933b3ca1bc9e37760730@quanstro.net>
2009-07-28  5:05 ` Corey
2009-07-28 13:22   ` erik quanstrom
2009-07-28 15:16     ` Russ Cox
2009-07-28 22:14       ` Dave Eckhardt
2009-07-28 22:16         ` erik quanstrom
2009-07-28 22:56           ` Corey
2009-07-29  1:42           ` Russ Cox
2009-07-29  4:24             ` Corey
2009-07-29  8:54               ` Corey
2009-07-29 14:02                 ` Steve Simon
2009-07-29 14:48               ` Russ Cox [this message]
2009-07-28 22:42     ` Corey
2009-07-28 23:50       ` erik quanstrom
     [not found] <09c88626d985457ecaa621715f4f1af0@quanstro.net>
2009-07-29  0:42 ` Corey
2009-07-29  1:04   ` erik quanstrom
     [not found] <26a2b1a9fb6ec5947c440b48b8bde174@quanstro.net>
2009-07-27 23:56 ` Corey
2009-07-28  0:35   ` erik quanstrom
2009-07-28  8:52   ` Steve Simon
2009-07-27  1:03 Corey
2009-07-27 16:28 ` Russ Cox
2009-07-27 20:31   ` Corey
2009-07-27 20:38     ` erik quanstrom
2009-07-27 20:58       ` Corey
2009-07-27 22:49       ` Corey
2009-07-27 22:52         ` erik quanstrom
2009-07-27 20:56     ` Lyndon Nerenberg
2009-07-30  4:15 ` Corey

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=dd6fe68a0907290748u51fe8fd2q139b1a87603032c7@mail.gmail.com \
    --to=rsc@swtch.com \
    --cc=9fans@9fans.net \
    --cc=corey@bitworthy.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).