From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@9fans.net Subject: Re: [9fans] venti: mem=sealed vs disk=sealed From: "Russ Cox" Date: Fri, 4 Jul 2008 11:44:23 -0400 In-Reply-To: <68ac7f3d0807040249g53f2575ekb64f158eedb96db8@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20080704154219.1AC3E1E8C26@holo.morphisms.net> Topicbox-Message-UUID: db0c0dde-ead3-11e9-9d60-3106f5b1d025 > 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