GCViewer | Tagtraum stopped development | Code Editor library
kandi X-RAY | GCViewer Summary
kandi X-RAY | GCViewer Summary
GCViewer is a little tool that visualizes verbose GC output generated by Sun / Oracle, IBM, HP and BEA Java Virtual Machines. It is free software released under GNU LGPL. You can start GCViewer (gui) by simply double-clicking on gcviewer-1.3x.jar or running java -jar gcviewer-1.3x.jar (it needs a java 1.8 vm to run). For a cmdline based report summary just type the following to generate a report (including optional chart image file): java -jar gcviewer-1.3x.jar gc.log summary.csv [chart.png] [-t PLAIN|CSV|CSV_TS|SIMPLE|SUMMARY] When logfile rotation (-XX:+UseGCLogFileRotation) is enabled, the logfiles can be read at once: java -jar gcviewer-1.3x.jar gc.log.0;gc.log.1;gc.log.2;gc.log.current summary.csv [chart.png] [-t PLAIN|CSV|CSV_TS|SIMPLE|SUMMARY].
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Read the GC model
- Parse a type string
- Parses the detail events if one exists
- Parses a line
- Read G1 log
- Parses memory format of G1 event
- Parses the log event details
- Parses a memory information structure
- Print this EventBuffer to a StringBuffer
- Invoked when an action is pressed
- Return a string representation of this object
- Writes the GC event
- Called when an internal frame is closing
- Create the default model
- Paint the graphics context
- Initialise the formatters
- Read and return the GC model
- Read the GC log
- Process an XML start element
- Reads the GC data
- Reads the GC model
- Paint the component
- Writes the GC model to the output stream
- Compute a polygon from the model
- Report an end element
- Compute the polygon for a given model
GCViewer Key Features
GCViewer Examples and Code Snippets
Community Discussions
Trending Discussions on GCViewer
QUESTION
ANSWER
Answered 2019-Mar-20 at 12:24Without knowledge of your application, here are some general thoughts:
- Your application seems to have a high amount of long-lived objects (only 9gb of the tenured generation get collected, 15gb remain), which cause your problems: While allocation speed determines the frequency of GC pauses it is the amount of living objects (that cannot be freed by GC) which determines the length of the GC pauses.
- One possible cause could be that your application acts as an in-memory database to some extent. That is, the objects are not needed all the time, but are not written to a database to retain fast in-memory access to them. In that case, you should store them off-heap (in memory not managed by the GC) or use an in-memory database, e.g. Redis. This way, they will be accessible with low latency but won't be considered by the GC because they won't be reclaimed anyway.
- Another possible solution might be to tune your GC settings: You could switch to G1, increase the size of your young generation or increase the promotion threshold; or a combination of those. Increasing the young generation and reducing promotion might lead to much less growth of the tenured generation and thus to less frequent major collections. Switching to the G1 collector would give you the benefit that this collector is able to only consider some survivor regions and can leave regions with immortal objects alone.
QUESTION
My application is G1GC with a memory size of 45GB. I am seeing long GC times. While investigating, I found that only 5% of the heap for young generation which is being filled up very frequently leading to frequent collections. Moreover, although most of the heap is empty, GC is not adjusting the "NewSize" and it is constant at 5% and most of the heap is reserved (but unused) for "Tenured Generation". G1GC documentations suggests that NewSize is adjusted automatically during every GC collection.
Question:-
- Default values for "G1MaxNewSizePercent" and G1NewSizePercent are 60% and 5% respectively, why GC is not adjusting the size automatically and why is it stuck at 5%. http://www.oracle.com/technetwork/articles/java/g1gc-1984535.html
- Do I need to do something special for GC to start auto adjusting?
- Why most of the heap got reserved for the tenured generation at first place?
Following is the GCViewer snapshot
JVM flags
...ANSWER
Answered 2018-Feb-27 at 07:19You are spending most of the time in Reference Processing. Almost all of your GC Time.
[Ref Proc: 1180.2 ms] .
Reference Processing stage involves processing any soft/weak/final/phantom/JNI references discovered by the STW reference processor.
The Eden(Young Gen) Memory is determined by Heuristics collected by the G1 collector on every GC. It adjusts the Young Gen according to the GC history so that the maximum pause time matches your target pause time. If your target pause time is short, the eden memory can be short.
If nothing is set, the target pause time by default is 200ms. I am guessing because your Ref Proc time is so large, G1 keeps your eden region size small to give you the best possible pause time.
You should investigate what references are on the heap and see if this is normal for your application to produce these many references. Fix that and your Eden memory should increase automatically.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install GCViewer
You can use GCViewer like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the GCViewer component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page