RFR: 8307958: Metaspace verification is slow causing extreme class unloading times [v2]
Axel Boldt-Christmas
aboldtch at openjdk.org
Wed May 24 06:25:55 UTC 2023
On Tue, 23 May 2023 12:02:44 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> > Maybe it is overly defensive to add it to the split and get_chunk paths. The observed slowdown was for purge() calls, and more specifically the verification downstream of ~MetaspaceArena(), which includes return_chunk and merge() as well as freelist contains() verification.
>
> Ok, thanks for the info. That makes sense.
>
> I thought there were more GC tests for class unloading but I can't find them. If you create one test with loading/unloading a class 100 times with the SOMETIMES verification on, I think that would run fast enough and exercise the code paths that won't be exercised regularly. You can put it in runtime/ClassUnload with some other tests. Or if you can find tests already in metaspace that do this, that would be sufficient.
`test/jdk/jdk/jfr/event/runtime/TestMetaspaceAllocationFailure.java` and `test/hotspot/jtreg/runtime/Metaspace/FragmentMetaspace.java` seems like relevant candidates for running with `-XX: VerifyMetaspaceInterval=1`
I'll look at creating a more fuzzy stress test which uses `jdk.test.lib.classloader.*` to load and unload class loaders.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14084#issuecomment-1560520966
More information about the hotspot-runtime-dev
mailing list