RFR: 8284404: Too aggressive sweeping with Loom

Vladimir Kozlov kvn at openjdk.java.net
Tue May 24 14:27:52 UTC 2022


On Thu, 12 May 2022 16:07:11 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> The normal sweeping heuristics trigger sweeping whenever 0.5% of the reserved code cache could have died. Normally that is fine, but with loom such sweeping requires a full GC cycle, as stacks can now be in the Java heap as well. In that context, 0.5% does seem to be a bit too trigger happy. So this patch adjusts that default when using loom to 10x higher.
>> If you run something like jython which spins up a lot of code, it unsurprisingly triggers a lot less GCs due to code cache pressure.
>
> Did you run our regular performance testing with loom to see how this change affect performance?
> Why 10x and not other number?

> @vnkozlov Is your concern that a user explicitly overrides the default to a value that ends up not being good? If so, I'm not sure why we would be in the business of preventing the user from shooting itself in the foot and guessing what the user really wanted here. Maybe I missed something.

Yes, it was my concern which was unjustifiable because I missed that this code is guarded by `FLAG_IS_DEFAULT(SweeperThreshold)`. So you simply set `SweeperThreshold` to 5% (default is 0.5) which is fine.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8673


More information about the hotspot-compiler-dev mailing list