RFR: JDK-8275608: runtime/Metaspace/elastic/TestMetaspaceAllocationMT2 too slow [v2]
Aleksey Shipilev
shade at openjdk.java.net
Fri Oct 29 09:06:09 UTC 2021
On Fri, 29 Oct 2021 08:31:40 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 one additional commit since the last revision:
>
> adapt copyrights
Looks fine to me, some minor nits I wondered about below.
test/hotspot/jtreg/runtime/Metaspace/elastic/MetaspaceTestManyArenasManyThreads.java line 66:
> 64:
> 65: for (RandomAllocatorThread t: threads) {
> 66: if (t.allocator.arena.numAllocationFailures > 1000) {
Feels like `numAllocationFailures` should be `volatile` (actually, `VarHandles.getOpaque` would be enough, but you probably don't want to bring all that fuss in)?
test/hotspot/jtreg/runtime/Metaspace/elastic/RandomAllocator.java line 62:
> 60: // Allocate a random amount from the arena. If dice hits right, add this to the deallocation list.
> 61: void allocateRandomly() {
> 62: breatheTicks ++;
Suggestion:
breatheTicks++;
test/hotspot/jtreg/runtime/Metaspace/elastic/RandomAllocator.java line 78:
> 76: // Randomly choose one of the allocated in the deallocation list and deallocate it
> 77: void deallocateRandomly() {
> 78: breatheTicks ++;
Suggestion:
breatheTicks++;
-------------
Marked as reviewed by shade (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/6041
More information about the hotspot-runtime-dev
mailing list