RFR: JDK-8275608: runtime/Metaspace/elastic/TestMetaspaceAllocationMT2 too slow [v3]
Thomas Stuefe
stuefe at openjdk.java.net
Fri Oct 29 10:04:09 UTC 2021
On Fri, 29 Oct 2021 09:17:31 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Small tweaks to make these elastic metaspace stress tests faster.
>>
>> Before, runtime for individual tests was wobbling between 40+ seconds and some rare timeouts at 3+ minutes, depending on machine load and random luck. Now, we get a steadfast 35-37 seconds.
>>
>> I tested this manually, checking the numbers that we really test what we want to test (a lot of arena activity). Also GHAs and SAP nightlies.
>>
>> Thanks, Thomas
>
> Thomas Stuefe has updated the pull request incrementally with two additional commits since the last revision:
>
> - Update test/hotspot/jtreg/runtime/Metaspace/elastic/RandomAllocator.java
>
> Co-authored-by: Aleksey Shipilëv <shade at redhat.com>
> - Update test/hotspot/jtreg/runtime/Metaspace/elastic/RandomAllocator.java
>
> Co-authored-by: Aleksey Shipilëv <shade at redhat.com>
Changes:
- Used volatile as Alexey suggested
- changed the breathe-in-and-out logic a bit. No need to count ticks on breathe in, the logic is:
- allocate till we hit ceiling
- deallocate a bit
- again allocate until full
- repeat 1000 times
This leads to a reasonable small - but not 0 - number of re-created arenas, which was the intention of this test. Beforehand, allocation threads were too often recreated, we spent too much time in thread creation and -cleanup.
I also changed the test names, because I want to be able to call them individually with '#bla' and that does not work if the subtest name contains non-alphanumerics.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6041
More information about the hotspot-runtime-dev
mailing list