Java Memory Management And Garbage Collection Management
Kirk Pepperdine, Java tuning specialist has posted article in TSS about why garbage collection so expensive.
Here the summary of the article :
Point 1
The advice given in that document appears to be based on the assumption that memory-to-memory copying of objects from one space to another is expensive. The conclusion one would draw from this is one should configure the JVM to move objects from young to old space as soon as it is practical. In technical parlance this meant reducing the size of the survivor spaces so that objects would be immediately promoted to the old generation. The first time I tried to follow this advice I quickly discovered that I need to ignore the “expert advice” and make survivor spaces large to delay promotion to old space. Now we have some new “expert advice” that is being questioned by other “experts”. The question is: what is it that they are seeing that is leading them to question Brian’s advice. Even more importantly, who should we be listening to?Point 2
There are many coding and design practices that can help make modern garbage collection expensivePoint 3
Do not leave object behind
|