[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-gc-use
Subject:    Re: Lightweight G1 remembered set logging
From:       Thomas Schatzl <thomas.schatzl () oracle ! com>
Date:       2022-04-21 10:20:04
Message-ID: 2208a52e-7627-9284-48df-7b70e1d33eb0 () oracle ! com
[Download RAW message or body]

Hi,

On 21.04.22 04:05, Tianqi Xia wrote:
> Hi,
> 
> It seems like currently the only way to log rememebered set usage during 
> GC is setting the G1SummarizeRSetStatsPeriod flag, which can be quite 
> expensive. Testing on my local box, running BigRamTester (byThomas 
> Schatzl) with JDK11 + 10GB heap + 1GB RSet setup, it took hundreds of 
> milliseconds to process and print those remembered set usage 
> information, and this happened when the world is stopped.
> 
> After a little bit hacking and digging I found most of the time is spent 
> on the following 2 operations:
> 1. Calculating the size of PerRegionTable freelist, with 1GB RSet usage, 
> this freelist can contain more than half a million entries.
> 2. Calculating the occupancy of OtherRegionTable, which iterates over 
> all PerRegionTables being used.
> After omitting these 2 operations, we can cut down the overall logging 
> time of remembered set usage to ~1ms, under the same setup.
> 
> Can we introduce a "lightweight" mode of remembered set logging that 
> trims the above mentioned 2 operations? It makes it possible for turning 
> on remebered set logging in prodcution envrionment, which really helps 
> diagnose certain performance issues.


  a fix for this particular problem has been implemented in JDK-8233919 
for JDK 14. Since then that accounting should be very fast (one add per 
region, no more iterating through the actual remembered sets), and so 
the logging much lighter weight, approximately in the range you state.

Since typically problems with the remembered sets means problems with 
remembered set footprint, one option that often helps is to do what 
JDK-8223162 (in JDK 13) did, increasing the so-called the sparse entry 
sizes via -XX:G1RSetSparseRegionEntries, manually. See the release note 
at https://bugs.openjdk.java.net/browse/JDK-8225343 for a comparison of 
the old and new default values.

Thanks,
   Thomas
_______________________________________________
hotspot-gc-use mailing list
hotspot-gc-use@openjdk.java.net
https://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic