All Questions
10 questions
18
votes
2
answers
2k
views
What exactly is considered a garbage collection root and how are they found in the HotSpot JVM? [closed]
Intro:
At university one learns that typical garbage collection roots in Java (and similar languages) are static variables of loaded classes, thread-local variables of currently running threads, "...
2
votes
1
answer
3k
views
Unable to Connect to a Remote JVM using JStat
From the Jstat Documentation , jstat can be connected to a local as well as remote JVM. The URI can be formed as
[protocol:][//]lvmid[@hostname[:port]/servername]
I have a JVM running on one of the ...
3
votes
1
answer
1k
views
Setting non-standard java vm options -Xms without -X
Oracle documentation says that non-standard vm options like the startup heap size and the maximum heap size, are set by prefixing them with -X. So to set the startup heap size to 128 MB, you would use ...
6
votes
1
answer
2k
views
Hotspot JVM - G1GC Heap resizing issue
I was recently testing a presentation app with a relatively high concurrent load. The application is a java application and is running on Hotspot JVM (1.8.0_111).
I could get a maximum throughput of ...
1
vote
1
answer
455
views
HotSpot Serviceability Agent's iterateObjectsOfKlass() is too slow
I was able to call ObjectHeap.iterateObjectsOfKlass (with the help of SA) to obtain all objects belonging to a certain class. The result is exactly what I have expected, but the performance is not.
...
1
vote
1
answer
1k
views
How to make Eden Space size double Tenured Space
Is there any way to make the Eden space proportionally bigger than Tenured? There is NewRatio but it works the other way (Tenured is that times bigger than Eden).
I know there is -XX:NewSize= and -XX:...
21
votes
3
answers
43k
views
Where are instance variables of an Object stored in the JVM?
Is an instance variable of an object in Java stored on the stack or method area of the JVM?
Also, do we have different instance variable for multiple threads?
If it is stored in method area how is ...
9
votes
1
answer
2k
views
How does the dynamic tenuring threshold adjustment work in HotSpot JVM?
So far I know that:
Objects are allocated in the eden space and if they survive a minor collection they get promoted to one of the survivor spaces
For further minor collections objects' that survive ...
3
votes
4
answers
3k
views
Java Heap Space and the RAM
I have a question that bothered me after reading an article on analyzing thread dumps. There was one paragraph which mentioned that the logical maximum heap size in a 32-Bit JVM is 4GB.
This link ...
21
votes
4
answers
23k
views
Encourage the JVM to GC rather than grow the heap?
(Note that when I say "JVM", I really mean "Hotspot", and I'm running the latest Java 1.6 update.)
Example situation:
My JVM is running with -Xmx set to 1gb. Currently, the heap has 500mb allocated,...