Eden Space reclaim
Hi,
I tried to analyze how my tomcat was behaving by printing out the different memory behaviours as follows:
localhost
MEMORY TYPE: Code Cache
Used: 4 mb
Committed: 4 mb
Max: 48 mb
MEMORY TYPE: PS Eden Space
Used: 25 mb
Committed: 33 mb
Max: 54 mb
MEMORY TYPE: PS Survivor Space
Used: 0 mb
Committed: 1 mb
Max: 1 mb
MEMORY TYPE: PS Old Gen
Used: 10 mb
Committed: 227 mb
Max: 455 mb
MEMORY TYPE: PS Perm Gen
Used: 14 mb
Committed: 16 mb
Max: 128 mb
localhost
MEMORY TYPE: Code Cache
Used: 4 mb
Committed: 4 mb
Max: 48 mb
MEMORY TYPE: PS Eden Space
Used: 26 mb
Committed: 33 mb
Max: 54 mb
MEMORY TYPE: PS Survivor Space
Used: 0 mb
Committed: 1 mb
Max: 1 mb
MEMORY TYPE: PS Old Gen
Used: 10 mb
Committed: 227 mb
Max: 455 mb
MEMORY TYPE: PS Perm Gen
Used: 14 mb
Committed: 16 mb
Max: 128 mb
localhost
MEMORY TYPE: Code Cache
Used: 4 mb
Committed: 4 mb
Max: 48 mb
MEMORY TYPE: PS Eden Space
Used: 27 mb
Committed: 33 mb
Max: 54 mb
MEMORY TYPE: PS Survivor Space
Used: 0 mb
Committed: 1 mb
Max: 1 mb
MEMORY TYPE: PS Old Gen
Used: 10 mb
Committed: 227 mb
Max: 455 mb
MEMORY TYPE: PS Perm Gen
Used: 14 mb
Committed: 16 mb
Max: 128 mb
What I noticed is that the PS Eden Space keeps increasing each time a request comes and once it reaches the committed size I have to restart my tomcat server.
Is there a way I could reset it to zero once the used memory is 3/4th
or more of the committed heap memory?
I tried System.gc() but it did not work, would I be able to use jconsole for doing it?
Please let me know id I can and how I could.
Thanks,
Samanth.

