RFR (S): JEP-142: Reduce Cache Contention on Specified Fields

David Chase david.r.chase at oracle.com
Tue Nov 27 06:17:18 PST 2012

On 2012-11-27, at 8:52 AM, Jesper Wilhelmsson <jesper.wilhelmsson at oracle.com> wrote:
> What I do have an opinion about is garbage collection, and I have a potential future work question.
> Annotated fields and classes will be padded and require more memory. What would be the optimal behavior in an out of memory situation? Should the GC try to remove the padding to keep OOME away, or should we just accept that these objects are now larger and we are out of memory.

I think it might be useful to play with the feature for a little while to get some feel for how much of a heap can be "contended" before we worry too much about this.  My off-the-cuff reaction is that if it is not in the cache, then it is not really contended, and how big is the cache compared to main memory?  Imagine a gigabyte heap and a megabyte cache -- that's only one part in 1000.  We might want to measure first.


More information about the hotspot-dev mailing list