Java Memory explained (SUN JVM)
Solution 1
Here's a list of resources I had noted down. Some of these explain how the heap/garbage collection works and some have details on how to configure everything.
IBM
- How does garbage collection work?
- Detailed description of garbage collection
- Generational and concurrent garbage collection
Sun
- Turbo-charging Java HotSpot Virtual Machine, v1.4.x to Improve the Performance and Scalability of Application Servers - (discussion of low pause collectors)
- Performance Documentation for the Java HotSpot VM
- Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1
- Frequently Asked Questions About the Java HotSpot VM
- Java HotSpot VM Options
Other
- Java Specialists newsletter
- Java Performance Tuning web site
- Java World - Pick up performance with generational garbage collection
- DZone - How to tame Java GC Pauses
Solution 2
This article from Sun on Tuning Garbage Collection with the 5.0 Java Virtual Machine should have pretty good definitions and explanations of everything you are looking for; I don't believe a ton has changed on this subject between 5.0 and 6.0
There is also this whitepaper on Memory Management in the Java HotSpot Virtual Machine.
More Sun documentation, technical articles, and whitepapers.
Solution 3
A fairly recent one: http://www.ibm.com/developerworks/java/library/j-nativememory-linux/
Solution 4
Also, please see these JavaOne sessions for JVM GC. (including video playback)
- Garbage Collection Friendly Programming
- Garbage Collection Tuning in the Java HotSpot virtual machine
- The Garbage First Garbage Collector <== highly recommended
- Performance considerations in concurrent garbage-collected systems
UPDATE:
Oracle changed JavaOne contents as paid one. Please see this article for G1 garbage collector instead.
Solution 5
I find that Sun's Memory Management Whitepaper offers a good overview.
The final section offers useful links to delve deeper into areas of particular interest.
Mauli
My favourite language is Python, although for work I have to program in Java (Spring, Hibernate, OpenSCADA).
Updated on June 20, 2022Comments
-
Mauli almost 2 years
I tried to find an interpretation of the memory segments of the sun java vm, which would also be understandable by an administrator. It should explain what heap / non-heap memory is and the significance of the different memory pools.
If it would somehow relate to the jconsole view, it would be a bonus.
Is there somewhere a website with such an explanation?
-
Mauli about 15 yearsI like the list, but there is not one explanation which would be suitable for a non-programmer.
-
Mauli about 15 yearsI especially like the whitepaper, but as I said above, nothing suitable for a non-programmer.
-
Haider about 15 yearsI don't know what it is you are after then. A really high level, non-technical overview? This stuff is very technical in nature, but you don't have to be a programmer to understand it (although it helps). I've added a JavaWorld article which gives some pictures of how the heap is broken down. I'm sure you'd find more stuff like this if you Google for some of the terms used in this article, e.g. Eden Space, New Generation, Old Generation, Survivor Space, Tenured, etc.
-
Wonil over 11 yearsOracle changed JavaOne online sessions as paid service - USD 245 from JavaOne 2010. :(
-
Sully over 10 yearsFunny thins is that how I got here. Someone rejected another user's edit/fixes. I guess, because they removed the deadlinks instead of replacing them -- Thanks basZero