9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Ideas for gc on venti
@ 2008-06-18 19:35 Enrico Weigelt
  2008-06-18 20:16 ` Russ Cox
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Enrico Weigelt @ 2008-06-18 19:35 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


Hi folks,


as I'm using venti as storage backend for an media archive, where
content can be deleted (and probably will happen often enough),
I'm currently thinking about how an garbage collection could be
achived.

Let's assume the following premise:

* only a few well-known apps are writing to venti (eg. only
  vac and vtstore).
* we know all the root scores and can iterate through the
  metadata from time to time.
* venti's storage is divided in several logs of not to big size
  (eg. 2GB).

Now we introduce an "deprecated" mode for an volume: no more
writes to that volume, requested blocks are automatically moved
to another volume (and cleared from the deprecated one). Maybe
from time to time there might run an compaction process which
removes the holes in the volume.

Well, that's not yet any form of gc - just an smooth data moving
from one volume to another - also good if you intend to take some
disk offline in near future, w/o serious interruption.
(The deprecated volume get emptier and emptier, and no new
data is added.)

GC is the next step:

Assuming each block to keep is accessed at least once in some given
time, we'll know that the remaining data on the volume will be
trash after that time. So everything we've got to do is to iterate
through all archives and access all their blocks (*1). Once this
is completely done, the deferred volume only contains trash and
can be safely deleted.


What do you think about that approach ?

cu

*1) we could introduce a new "touch" rpc call, which simply tells
venti that some list of blocks is still required, but does not
send back their data.

--
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 cellphone: +49 174 7066481   email: info@metux.de   skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------



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

end of thread, other threads:[~2008-06-19 14:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-18 19:35 [9fans] Ideas for gc on venti Enrico Weigelt
2008-06-18 20:16 ` Russ Cox
2008-06-18 20:50   ` Enrico Weigelt
2008-06-18 20:32 ` erik quanstrom
     [not found] ` <d39497d76feddcee629a4ea8c7af63d9@quanstro.net>
2008-06-18 20:57   ` Enrico Weigelt
2008-06-18 21:29     ` Bakul Shah
2008-06-18 22:37       ` Skip Tavakkolian
2008-06-18 22:54         ` erik quanstrom
2008-06-19 12:46     ` erik quanstrom
2008-06-19 14:20       ` a
2008-06-19 14:33         ` erik quanstrom

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