Return-Path: Delivered-To: apmail-jakarta-jcs-dev-archive@www.apache.org Received: (qmail 9192 invoked from network); 21 Aug 2006 12:53:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Aug 2006 12:53:34 -0000 Received: (qmail 55098 invoked by uid 500); 21 Aug 2006 12:53:12 -0000 Delivered-To: apmail-jakarta-jcs-dev-archive@jakarta.apache.org Received: (qmail 55043 invoked by uid 500); 21 Aug 2006 12:53:12 -0000 Mailing-List: contact jcs-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JCS Developers List" Delivered-To: mailing list jcs-dev@jakarta.apache.org Received: (qmail 54988 invoked by uid 99); 21 Aug 2006 12:53:12 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Aug 2006 05:53:12 -0700 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [209.191.125.90] (HELO web38714.mail.mud.yahoo.com) (209.191.125.90) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 21 Aug 2006 05:53:11 -0700 Received: (qmail 40752 invoked by uid 60001); 21 Aug 2006 12:52:50 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=SOi048PpN5t8fPJ8KDq7aRZayLhA9uG0z81xOJ1zimLxKraH4O73Y694WsDEUSQhUmZ5IqCRtgkK2Ifqo1uDesXnFXwvSdCtX53olZ1ls2Fo5z1SOSJd2DqnOXHPn7uS9CgVnqduxCNcMt+SGNsaNd8OKJMvF/ha7boxxLe5lnk= ; Message-ID: <20060821125250.40750.qmail@web38714.mail.mud.yahoo.com> Received: from [72.229.165.202] by web38714.mail.mud.yahoo.com via HTTP; Mon, 21 Aug 2006 05:52:50 PDT Date: Mon, 21 Aug 2006 05:52:50 -0700 (PDT) From: Aaron Smuts Subject: Re: new disk cache fixed block size model suggestion To: JCS Developers List In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --- Hanson Char wrote: > >It would simply be a list of positions. No > > size data is needed, since all the blocks are the > same > > size. > > If an item fits in a block, but has a size smaller > than the block > size, you still need to record the size data. What > am I missing here > ? Right now the recycle bin holds the length of the item on disk. Originally the length of the item was only stored on disk, in the first 4 bytes of the record. Now (and for some time I think) the length is stored along with the key and position in memory so it can be used in the recycle bin. This makes the length on disk redundant. The alternative would be to look up the length when an item is removed and then store this in the recylce bin. This might be preferable, since the overall memory usage would be 4 bytes lower per entry. . . . In the block model, the recycle bin no longer needs the size, since all blocks are the same size. You still need to store the actual length of the item on disk, but it would not be redundant. Aaron --------------------------------------------------------------------- To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: jcs-dev-help@jakarta.apache.org