![]() ![]() ![]() ![]() |
| Topics this page:
|
|
|
Java 6 -server fared surprisingly well on Intel Pentium 4 in the Computer Language Benchmarks Game Big Table vendors HyperTable vs. HBase was won largely because of garbage collection issues. | ![]() ![]() ![]() |
| ![]()
| ![]() ![]() ![]() |
|
Parameter | Win 32-bit | Win 64-bit |
---|---|---|
-Xms | 3670k | |
-Xmx | 64m | |
-Xms | 3670k | |
-Xmx | 64m | |
-XX:MinHeapFreeRatio= | 40 | |
-XX:MaxHeapFreeRatio= | 70 |
If you are running SAP's Sherlok, use 1.1 GB.
Instead of huge heaps, use additional server nodes.
On Unix machines, if you have 4GB RAM, start with this:
-Xmx3550m -Xms3550m -Xmn2g -Xss128k -ParallelGCThreads=8 -XX:+UseParallelOldGC
Values for 64-bit OS are about 30 percent higher.
| ![]() ![]() ![]() |
| ![]() ![]()
| ![]() ![]() ![]() |
|
![]() ![]() ![]() |
The young generation is also called the new generation, as new allocations of memory are created for apps in the eden-space within the young generation.
When eden runs out of space, a minor "scavenge" is done to one of two alternating survior spaces within the young generation. One survivor space is empty at any time, and serves as a destination of the next, alternating between to-space and from-space.
The allocation of space among the three areas within the new generation
can be controlled by a flag such as
SAP recommends -XX:SurvivorRatio=2 -XX:TargetSurvivorRatio=90
The first options controls how big is eden space compared to survivor space
(the latter contains two semispaces);
the second option sets the desired percentage of the survivor space heap
which must be used before objects are promoted to the old generation.
The JVM aims to keep survivor spaces half full by recalculating at each garbage collection a threshold number of times an object can be copied before being tenured.
Adding flag
Desired survivor size 131072 bytes, new threshold 31 (max 31) - age 1: 5496 bytes, 5496 total - age 13: 760 bytes, 6256 total - age 14: 760 bytes, 7016 total - age 17: 760 bytes, 7776 total - age 20: 14720 bytes, 22496 total
Since most objects have short lifetimes, objects are copied between survivor spaces until they become old enough to be copied to the Tenured Generation, also called the old generation, a larger area collected less often.
The tenured generation also receives objects when the to-space is full.
Garbage in the tenured generation is collected during a major collection.
| ![]()
With the Mark-Sweep-Compact (MSC) algorithm:
A Generational Mostly-concurrent Garbage Collector [Printezis/Detlefs, ISMM2000] | ![]() ![]() ![]() |
| ![]()
| ![]() ![]() ![]() |
| ![]() Rico Mariani's .NET Performance Tidbits describes how to use tasklist to get the process id for VADump (Virtual Address Dump) command-line tool to show the type, size, state, and protection of each segment of virtual address space. It's used to make sure virtual address space is not over-allocated. described here and windbg (Windows Debugger) with the mscorwks.dll loaded from the same place that hold SOS.
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
| ![]() ![]() ![]() |
Related:
![]()
| Your first name: Your family name: Your location (city, country): Your Email address: |
Top of Page ![]() Thank you! |