RFR(XS): 8232533: G1 uses only a single thread for pretouching the java heap
Stefan Johansson
stefan.johansson at oracle.com
Tue Nov 19 09:11:05 UTC 2019
On 2019-11-19 09:35, Thomas Schatzl wrote:
> Hi,
>
> On 18.11.19 22:31, sangheon.kim at oracle.com wrote:
>> Hi all,
>>
>> Can I have some reviews for this small patch?
>>
>> G1 initiates only 1 GC thread for faster start-up and then initialize
>> more when we need more GC threads.
>> This is also same when we enable +AlwaysPreTouch option, so 1 thread
>> touching all heap situation happens as the CR described.
>>
>> The proposed patch is trying to cap the total worker thread count
>> instead of active worker thread count. And this will make faster
>> start-up as well.
>
> the rationale is that supposedly if a user is specifying
> AlwaysPreTouch, he wants best performance, and does not care so much
> about initializing the time it takes to initialize the extra threads.
> Also initializing the threads first and then doing the work in parallel
> should be faster than pretouching with only a single thread. :)
>
> I.e. in the case of the CR, it takes 2mins to pretouch the heap -
> initializing the threads shouldn't be that slow :P
>
>>
>> CR: https://bugs.openjdk.java.net/browse/JDK-8232533
>> Webrev: http://cr.openjdk.java.net/~sangheki/8232533/webrev.0/
>> Testing: hs-tier1
>
> Please fix the copyright date before pushing if you want. I do not need
> a re-review for this change. Looks good otherwise.
Looks good to me too,
Stefan
>
> Thanks,
> Thomas
More information about the hotspot-gc-dev
mailing list