G1 GC Tuning parameters

Narasimha C Achi Narasimha.Achi at nab.com.au
Wed Aug 8 23:27:47 UTC 2018


Hi Team,

Thanks for suggestions.
We changed our JVM parameters as below. Kindly let us know whether these parameters are fine our application which serves almost 50000 web service requests on each managed server( 6 managed servers).

-Xms6144m -Xmx6144m -Doracle.ons.maxconnections=3 -Djava.net.preferIPv4Stack=true -Doracle.net.SDP=true -Dssl.debug=false -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -Dweblogic.management.disableManagedServerNotifications=true
-verbose:gc -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M -Xloggc:/oracle/logs/prdb/paijeeapp/paidj2ee_domain/paidj2ee_server1/paidj2ee_server1_gc.log -Dweblogic.log.RedirectStdoutToServerLogEnabled=true -Dlog4j.configurationFile=log4j2.xml  -D_Offline_FileDataArchive=true -Xrs -Dweblogic.system.disableShutdownHook=true -XX:ConcGCThreads=4 -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/oracle/logs/prdb/paijeeapp/paidj2ee_domain/paidj2ee_server1/ -XX:+HeapDumpBeforeFullGC -XX:+PrintGCDateStamps

Thanks and Regards
Narasimha Chary Achi

-----Original Message-----
From: Thomas Schatzl [mailto:thomas.schatzl at oracle.com]
Sent: Wednesday, 8 August 2018 7:01 PM
To: Narasimha C Achi; hotspot-gc-use at openjdk.java.net
Subject: Re: G1 GC Tuning parameters

Hi Narashimha,

On Sat, 2018-08-04 at 07:58 +0000, Narasimha C Achi wrote:
> Hi Team,
>
> Please find attached logs. java web services are deployed in these
> servers.
> Attachment 1: shows to-space exhausted and allocation failure
> Attachment2: Log GC Pauses.
>
> Please find below G1 GC setting ini all our 4 managed servers.
>
> -XX:GCLogFileSize=10485760 -XX:InitialHeapSize=6442450944
> -XX:MaxGCPauseMillis=50 -XX:MaxHeapSize=6442450944
> -XX:NumberOfGCLogFiles=10 -XX:+PrintGC -XX:+PrintGCDetails
> -XX:+PrintGCTimeStamps -XX:+ReduceSignalUsage
> -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC
> -XX:+UseGCLogFileRotation -XX:concGCThread=4 –XX:+ExplicitGC
>
> Our observation is that heap utilization is more and free Heap
> Percentage comes to 8-9% and suddenly goes to 34%. Does this create
> any issues like outofmemory error and server crash?
> How to fine tune these parameters and what other parameters to change
> for proper GC process with less stop world times.
>
> Each server serves almost 50000 requests every day. Few times we
> observed to-space exhausted and Allocation Failure in GC logs.
>
> Please provide us details about any other parameters to tune to avoid
> GC Issues.

paidj2ee_server1*.log:

  from the logs I can observe that even after full gc (full heap
compaction) the heap does not significantly decrease.
Actually, the heap usage after full gc grows.

E.g. after the fourth full gc, the heap is ~5.6GB full out of 6GB (and young gen size is 300M, so you have 200M left).

There are mixed gcs, but they typically do not free much (a few megs), and the mixed gc cycle (the amount of times G1 tries to clean out old
gen) is typically just one.

This strongly suggests this setup has either a memory leak, the heap is too small or both.

serv1459.txt

  all full gcs are triggered by the application by a system.gc() call.
Either fix them in your application, or one could mitigate these with either -XX:+DisableExplicitGC or  -XX:+ExplicitGCInvokesConcurrent.

Other than that there is also a frightening trend of the application not leveling out its application memory usage. I.e. the VM is on the way to memory exhaustion in another ~200 hours (the setup "looses"
~10MB/hour) like the other already did.

Are these applications stable on a different collector? I would be surprised.

Hth,
  Thomas



____________________________________________________________
Report any spam emails to spam at nab.com.au Report any phishing / suspicious emails to hoax at nab.com.au For more information visit http://go/cybersafety ____________________________________________________________

The information contained in this email and its attachments may be confidential.
If you have received this email in error, please notify the sender by return email,
delete this email and destroy any copy.

Any advice contained in this email has been prepared without taking into
account your objectives, financial situation or needs. Before acting on any
advice in this email, National Australia Bank Limited (NAB) recommends that
you consider whether it is appropriate for your circumstances.
If this email contains reference to any financial products, NAB recommends
you consider the Product Disclosure Statement (PDS) or other disclosure
document available from NAB, before making any decisions regarding any
products.

If this email contains any promotional content that you do not wish to receive,
please reply to the original sender and write "Don't email promotional
material" in the subject.



More information about the hotspot-gc-use mailing list