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

Jesper Wilhelmsson jesper.wilhelmsson at oracle.com
Tue Nov 27 06:31:45 PST 2012


On 27/11/12 3:17 PM, David Chase wrote:
> 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.
You are absolutely right. It was just a random thought. This would be 
more of a saftey catch for people who sprinkle their code with 
annotations without knowing what they are doing. OOMEs probably won't be 
their biggest concern though. And I'm actually fine with allowing for 
the trigger happy developer to shoot his or her foot :-)
/Jesper



More information about the hotspot-dev mailing list