[jboss-dev-forums] [Design of JBossCache] - Re: Redesigning eviction

galder.zamarreno@jboss.com do-not-reply at jboss.com
Wed Jul 18 19:17:24 EDT 2007


When is an eviction needed? When we're running out of memory. If memory was infinite, we wouldn't need evictions.

An eviction is needed, what do we kick out? the node occupying the most? the node used less frequently?...etc

I guess it depends on how the two different aspects highlighted by nnnn are gonna evolve, but the use cases could multiply in the future.

The only downside to separating the two would be that users would have to think through the two, but they already have to do to some extent. It's certainly not easy to find out what storing 100 nodes of Class X is gonna take up memory wise. And then, they have to think which one they should be removing.

Something worth noting even if it's no strictly linked to evictions. We're trying to evict nodes because we have a finite memory, but what if Cache was able to reshuffle itself to make access to nodes that are more regularly used faster? i.e. there's no need to go down the tree n times (/a/b/c/d/e/f/g/h/i/j/k...../myinstance). Evictions are driven by memory requirements, and Reshuffles would be driven by performance, but both could benefit from the same statistics gathered?

Also, a result of an eviction process could be moving it to a node which has more free space that us, rather than passivating it to a db. For example, this could be done if we're able to determine that bringing the node from another cache instance would be faster than having to go to the db.

The bottom line is, data gathered from node usage, currently only used by evictions, could server for more purposes. What to do when a node needs to be evicted could also vary, and this is on top of what nnnn suggested, which is when an eviction is needed and who needs to go. We're only scratching the surface here...

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065598#4065598

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065598



More information about the jboss-dev-forums mailing list