RFC: AArch64: Set Segmented CodeCache default size to 127M

Andrew Haley aph-open at littlepinkcloud.com
Mon Feb 21 17:38:46 UTC 2022


On 2/21/22 16:49, Astigeevich, Evgeny wrote:
> Hi Andrew,
> 
> Sorry for the late reply. It was half term time.
> 
> Thank you for your feedback.
> 
>> I have seen bug reports from customers mystified
>> at poor OpenJDK performance which have turned out
>> to be code cache thrashing.
> 
> I think we have the case of code cache trashing. An application consumes
> ~90% of the code cache whatever the code cache is given. If the big code
> cache is given the set of hot methods becomes sparse. The size of the set
> is less than 32M. We have a few ideas to solve the trashing.

Please forgive me, but this paragraph makes no sense to me. I have
seen actual thrashing, where hot methods were being evicted and repeatedly
recompiled. This thrashing was fixed by increasing the size of the code
cache. I take your point about fragmentation, but it happens.

>> I'd like to see more information. What was the *average performance
>> gain* of all your benchmarks?
> 
> Full dacapo results ('-' means benchmark's time decreased, '+' means increased):

I worked it out myself. 0.8% gain, on a bunch of smallish benchmarks.
Unknown loss on large programs.

The results that went the other way were curious. That suggests to me
that there may be some other factors in play. I wonder what they are.

> I created https://bugs.openjdk.java.net/browse/JDK-8280872 "AArch64: Position non-nmethod segment in between profiled and non-profiled segments for 128M+ CodeCache".

> There are also:
> https://bugs.openjdk.java.net/browse/JDK-8280152 "AArch64: Duplicated trampolines in C2 NMethod Stub Code section"
> https://bugs.openjdk.java.net/browse/JDK-8280481 "Duplicated static stubs in NMethod Stub Code section"
Those look pretty uncontroversial: they won't help anything much if
at all, but at least we know they won't regress anything.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the hotspot-dev mailing list