9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] venti: mem=sealed vs disk=sealed
@ 2008-07-04  9:49 Juan Céspedes
  2008-07-04 15:44 ` Russ Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Juan Céspedes @ 2008-07-04  9:49 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

When asking for the "/index" URL to venti server, some arenas appear
having the "disk=sealed" flag in addition to the "mem=sealed" flag,
and some other don't.  I fail to see any mention of it in the
documentation, and a quick review of the source code makes me think
that it is related to "icachedirty", which I guess means that some of
the clumps in that arena have not yet gone into the index.  Am I
right?

Well, the fact is that sometimes venti appears to be doing a hard work
sealing arenas (I mean, indexing clumps), and sometimes it doesn't.
Right now, in my venti server, I have 6 arenas with "mem=sealed but
without "disk=sealed".  In addition to that, doing:

hget 'http://127.1:8080/graph?arg=icachedirty&text=1' | tail -1

gives always the same values: the "icachedirty" values doesn't change.

Is this normal?  Is there any way to force venti to index clumps?

In case that matters, I am running venti on Linux, from plan9port-20080616.

Thanks,

Juan Cespedes



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

* Re: [9fans] venti: mem=sealed vs disk=sealed
  2008-07-04  9:49 [9fans] venti: mem=sealed vs disk=sealed Juan Céspedes
@ 2008-07-04 15:44 ` Russ Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Russ Cox @ 2008-07-04 15:44 UTC (permalink / raw)
  To: 9fans

> When asking for the "/index" URL to venti server, some arenas appear
> having the "disk=sealed" flag in addition to the "mem=sealed" flag,
> and some other don't.  I fail to see any mention of it in the
> documentation, and a quick review of the source code makes me think
> that it is related to "icachedirty", which I guess means that some of
> the clumps in that arena have not yet gone into the index.  Am I
> right?

mem=sealed means that the arena has filled
and venti has stopped adding blocks to it,
moving on to the next arena.

disk=sealed means that venti has computed
the sha1 of the entire arena (the "seal") and
recorded it at the end of the arena.

for not very good technical reasons, venti won't
bother computing the seal until the arena blocks
are fully indexed, but logically these are independent.

also, and for good reason, venti doesn't bother
computing the seal if there is useful disk i/o that it
could be doing instead.  it only runs the sealing
process in the background, in idle moments.

venti had a bug wherein it would not ever try to
seal arenas in certain cases.  i checked in an old
fix to this last night.  that fix also marks arenas
in the index listing that are in the "waiting to seal" queue.

> Well, the fact is that sometimes venti appears to be doing a hard work
> sealing arenas (I mean, indexing clumps), and sometimes it doesn't.
> Right now, in my venti server, I have 6 arenas with "mem=sealed but
> without "disk=sealed".  In addition to that, doing:

venti may be doing hard work indexing clumps
or it may be doing hard work sealing arenas.
probably the former, since sealing arenas isn't
very hard (streaming data off disk into sha1)
and doesn't last very long.

the real thing to check is whether the "written:" and
"indexed:" statistics match.  presumably in your
case they do not, but it is not a big deal.  the data
is committed once it shows up in the "written:" statistics.
if venti were to crash right now, it would add any clumps
between "indexed:" and "written:" back to its index cache
for future indexing when it restarted.

> hget 'http://127.1:8080/graph?arg=icachedirty&text=1' | tail -1
>
> gives always the same values: the "icachedirty" values doesn't change.
>
> Is this normal?  Is there any way to force venti to index clumps?

this is normal.  since indexing isn't critical to data integrity,
venti only bothers to flush the index cache when there are
enough dirty entries to be worthwhile or when the system
seems to be otherwise idle.

if this bothers you, you can hget http://venti/kickicache
to kick off a new indexing round.  hget flushicache will
not complete until the index cache is completely flushed
out to the index.

again, it doesn't matter for data integrity.

russ



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

end of thread, other threads:[~2008-07-04 15:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-04  9:49 [9fans] venti: mem=sealed vs disk=sealed Juan Céspedes
2008-07-04 15:44 ` Russ Cox

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