james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Wellington <bwell...@xbill.org>
Subject Re: Caching in DNSJAVA
Date Mon, 09 Oct 2006 22:05:15 GMT
On Mon, 9 Oct 2006, Stefano Bagnara wrote:

> Brian Wellington wrote:
>> On Sat, 7 Oct 2006, Noel J. Bergman wrote:
>>> Approximate memory as to how much each node consume?
>> 
>> It depends on the data, mostly.  <snip/>
>> 
>> It's easy enough to get a rough measurement of how much 50000 nodes takes 
>> with a small test program, but it really depends on the format of the 
>> contents for it to be at all useful.
>
> Hi Brian,
>
> first of all, thank you for all your help!
>
> I just checked the dump and I extracted this numbers:
>
> 21384 SOARecord
> 20123 NSRecord
> 17744 ARecord
> 14354 MXRecord
> ----------------
> 73605 Total
>
> I don't know how to calculate them and why they are 73K and not 50K, but if 
> my fast dump analysis is ok they are using almost 20MB (depth calc including 
> byte data and Names), and this mean an average 280bytes per Record.

The 50K number is the number of nodes (names), not the number of records. 
There can be multiple records with either the same or different types in 
each node.

> Do this numbers make sense to you or is it better that I check in depth 
> "what" is using "how much"?

That seems realistic, given the number of objects needed to represent that 
much data.

> And what about the 73000 records against 50000 cache size? Is this because we 
> can have multiple records for every node?

Yes.

> I know we can provide our own Cache object as the default Cache, so I started 
> thinking about overriding it with a weak/soft cache so that it could not 
> cause OOM even with big cache limits, but I see that data (CacheMap) is 
> private and CacheMap is also private.
>
> Can I suggest to make some of the Cache private field/method protected or 
> extract the Cache interface from the default implementation?

Are you suggesting simply making CacheMap public, and making the data 
field accessible?  I don't think data should be public, but adding 
accessor methods would be ok.

Brian

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message