Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

heap space problem

843829Nov 1 2007 — edited Apr 7 2008
HI All
i am using jdk1.6 and when i am running a program by giving 768MB memory. The heap is shown as below after about 8 hrs
jmap -heap 23152
Attaching to process ID 23152, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 1.6.0_01-ea-b03

using thread-local object allocation.
Parallel GC with 2 thread(s)

Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 805306368 (768.0MB)
NewSize = 1048576 (1.0MB)
MaxNewSize = 4294901760 (4095.9375MB)
OldSize = 4194304 (4.0MB)
NewRatio = 8
SurvivorRatio = 8
PermSize = 16777216 (16.0MB)
MaxPermSize = 67108864 (64.0MB)

Heap Usage:
PS Young Generation
Eden Space:
capacity = 9895936 (9.4375MB)
used = 7784904 (7.424263000488281MB)
free = 2111032 (2.0132369995117188MB)
78.66768742239239% used
From Space:
capacity = 1900544 (1.8125MB)
used = 1416000 (1.35040283203125MB)
free = 484544 (0.46209716796875MB)
74.50498383620689% used
To Space:
capacity = 1835008 (1.75MB)
used = 0 (0.0MB)
free = 1835008 (1.75MB)
0.0% used
PS Old Generation
capacity = 28114944 (26.8125MB)
used = 20889792 (19.92205810546875MB)
free = 7225152 (6.89044189453125MB)
74.30138221153847% used
PS Perm Generation
capacity = 16777216 (16.0MB)
used = 15249056 (14.542633056640625MB)
free = 1528160 (1.457366943359375MB)
90.8914566040039% used


When we observe this the capacityof (PS Old Generation) initailly was around 740 MB, But after 8 to 10 hrs it is as above.

This situation is existing in jdk1.6 and not in jdk1.5
Even in jdk1.6 also. This occurs only in multiprocessor systems.

Now the problem with this is.
The above program whch was started is a process which runs for evey minute. Each time it actually queries on the DB gets an entry if exists and processes it. During this process it needs minimum of 100MB free space. Therefore Because of the above situation the free memory calculation is not correct.
We are using "Runtime.getRumtime().freeMemory()" for this purpose.

Suggest if this behaviour is changed in the jdk1.6.

or do we need to use some diferent equation for calculating the freeMemory.

can anyone help me on this

Thanks
Vijay Sunder
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 5 2008
Added on Nov 1 2007
7 comments
515 views