IMO, measuring object size using java.lang.instrument is not a good idea: first of all, it's probably very slow and the time to do so is linear to the number of live objects. Second, this probably takes into acount only objects in the cache, but not the cache structures used by Infinispan, JGroups and so on...
The approach I've recommended before is to trigger an eviction policy based on free/available memory. This can easily be fetched from the JVM via JMX... On 1/31/12 10:25 AM, Galder ZamarreƱo wrote: > Just saw this: https://github.com/wolfc/jboss-libra > > We should investigate the possibility of adding this to Infinispan and > provide memory size based eviction, WDYT? > > The performance impact would need to be measured too. > > EhCache has apparenlty done something similar but from what I heard, it's > full of hacks to work on diff plattforms... -- Bela Ban Lead JGroups (http://www.jgroups.org) JBoss / Red Hat _______________________________________________ infinispan-dev mailing list [email protected] https://lists.jboss.org/mailman/listinfo/infinispan-dev
