Serge Knystautas wrote:
The YourKit memory snapshots do not include weak and soft references
(unless you do something special when you started the JVM), so the
44MB I'm seeing allocated are strong references. Also looking at the
changelog, the CacheCleaner thread in dnsjava uses weak references,
but the cache itself does not use weak references.
Actually, it gets a bit worse. Out of my 52MB heap that is not
gc'able, here is what I see:
- 44MB in an xbill cache held by Lookup code that is held by an avalon
policy class holder.
- 3.2MB in an xbill cache held by DNS server
- 1.7MB in a cache behind java.net.InetAddress
dsnjava 2.0.1 currently caches up to 50000 records for each DNS type.
The number is hardcoded so we cannot change it.
We could set our own caches to dnsjava and size them as we prefer.
We should also remove the cache done in the DNSServer: why should we add
our own cache lookup (on dnsjava objects) when dnsjava already support this?
On the InetAddress side, I see that dnsjava is an SPI for dns lookups.
Adding "sun.net.spi.nameservice.provider.1=dns,dnsjava" we would make
all the dns calls to use dnsjava the way we configured it.
Should we use the spi approach or try to propagate the
DNSServer.staticMethods usage we currenlty use sometimes??
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]