Frederic Simon wrote:
> Well, there are a lot of advantage (Concurrency, usability, clean API, 
> ...) but for me the most important one is:
> With MapMaker and SoftReference you remove all case of OOME for 
> wrongly configured cache.
> Finding the sweet numbers for your cache is humanly impossible. There 
> are too many variables changing too often (Domain model objects, DB 
> setup, Memory, CPU, Network, I/O, User behavior, holidays, big working 
> days, ...)
> So, when you need more performance, you always increase the number of 
> objects in cache until you get OOME !
> Then you call support: There is a memory leak!
> Answer: It's not a leak, it's a voluntary accumulation of memory => 
> Wrongly configured cache
>
> Now moving to SoftReferences: Your cache will NEVER be the reason for 
> your OOME, and the configuration using 
> -XX:SoftRefLRUPolicyMSPerMB=25000 is a lot easier to get the sweet spot.
soft reference comes with an object creation and GC performance penalty. 
Not that you shouldn't use them, you just need to use the wisely.

Regards,
Kirk


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to