|
Throughput |
The percentage of total time not spent in garbage collection, considered over long periods of time. |
|
Garbage collection overhead |
The inverse of throughput, that is, the percentage of total time spent in garbage collection. |
|
Pause time |
The length of time during which application execution is stopped while garbage collection is occurring. |
|
Frequency of collection |
How often collection occurs, relative to application execution. |
|
Footprint |
A measure of size, such as heap size. |
|
Promptness |
The time between when an object becomes garbage and when the memory becomes available. |
Heap is divided into generations, mostly in two
- young objects
- old objects
Different collection algorithm can be used for different part (generation) of heap, and each algorithm can be optimized based on commonly observed characteristic of that particular generation.
weak-generation-hypothesis: most objects die young
Young generation collections occur relatively frequently and are efficient and fast because the young generation space is usually small and likely to contain a lot of objects that are no longer referenced. Objects that survive some number of young generation collections are eventually promoted to the old generation. Old generation is typically larger than the young generation and its occupancy grows more slowly. As a result, old generation collections are infrequent, but take significantly longer to complete.
| Young Generation | Most objects are initially allocated here. Consists of an area called EDEN plus two smaller SURVIVOR spaces. Objects are initially allocated in Eden. The survivor spaces hold objects that have survived at least one young generation collection and have thus been given additional chances to die before being considered "old enough" to be promoted to the old generation. |
| Old Generation | contains objects that have survived some number of young generation collections, as well as some large objects that may be allocated directly in the old generation. |
| Permanent Generation | holds objects that the JVM finds convenient to have the garbage collector manage, such as objects describing classes and methods, as well as the classes and methods themselves. |
minor collection: young generation collection, when young gen fills up. using configured young gen collection algorithm.
major collection: all generation collection (except may be permanent gen, which mostly never gets collected), when old gen fills up. using configured old gen collection algorithm.
compactation : if needed each gen is compacted separatly.
hi..i have one question..How can I force clean up for old gen for every 10 minutes?
Do you know what code should I write in cmd line?Hope to get ur feed back as soon as possible. Thanks in advance.
depends on what collector and jvm (sun,ibm etc.) you are using
I’m using sun. I’m trying to use this code but it didn’t work:
-Dsun.rmi.dgc.client.gcInterval=600000 -Dsun.rmi.dgc.server.gcInterval=600000
do you have -XX:+DisableExplicitGC on ?
No…I only write -Dsun.rmi.dgc.client.gcInterval=600000 -Dsun.rmi.dgc.server.gcInterval=600000…
Should I add -XX:+DisableExplicitGC on ??
no you should not add
how do you know its not running every 600000 secs ?
I’m using visualvm,which I can see the graph for old gen, young gen etc.
here is list of jvm options, see if something applies to your problem
http://blogs.sun.com/watt/resource/jvm-options-list.html