Brian,

> The caching algorithm in dnsjava should be fairly simple.  Calling 
> setMaxEntries() sets the number of DNS nodes (names) in the cache;
> all information about individual records with the same name is stored
> in one node.  The data structure is a LinkedHashMap with LRU semantics,
> to ensure that only a certain number of elements are retained.

So does that mean that Stefano's concern:

>> Unfortunately I think that in current DNSServer implementation we
>> can only tune the "IN" cache and not SOA, PTR and other caches. So
>> they will be 50000 anyway.

is unfounded, because there is only one cache, which we prepare as:

>   cache = new Cache (DClass.IN);
>   cache.setMaxEntries(maxCacheSize);
>   Lookup.setDefaultCache(cache, DClass.IN);

> I can't think of any reason why the number of elements wouldn't be 
> properly bounded

Neither can I.

> if the problem is that maxCacheSize nodes takes a lot of memory,
> that's not really fixable without changing the way nodes 
> are stored.

Approximate memory as to how much each node consume?

        --- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to