5 ms·
What is the default GC for the 1.8 JVM?
by Scarbutt 11y ago
What is the default GC for the 1.8 JVM?
- hyperpape 11y agoParallel. G1 will be default in 1.9. Edit: the part about 1.8 is wrong. 1.8 doesn't have a standard default.
- lovelearning 11y agoNot sure what you meant in the edit, but the first sentence is correct. Hotspot 1.8 does default to Parallel collector in the absence of any explicit GC setting VM arguments. [1]: http://hg.openjdk.java.net/jdk8u/jdk8u60/hotspot/file/37240c1019fd/src/share/vm/runtime/arguments.cpp#l1569 http://hg.openjdk.java.net/jdk8u/jdk8u60/hotspot/file/37240c...
- hyperpape 11y agoThat's what I initially thought, but then looked at http://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html http://docs.oracle.com/javase/8/docs/technotes/tools/unix/ja... and confused myself.
- chrisseaton 11y agoUnrelated but I don't think there will be a Java 1.9 - it will simply be Java 9.0 http://openjdk.java.net/jeps/223 http://openjdk.java.net/jeps/223.
- iheartmemcache 11y agoIt depends on like, a billion different things. Odds are if you havent fed any arguments to your VM it'll be concurrent mark-and-sweep. It depends on a ton of things like RAM avaialbility, percentages of ideal G0->G1 and G1->old [and if you've even defined your 'ideal' otherwise it defaults to around 20%], the predictability of your heap access and/or growth, if you're using/reusing object pools and the habits of that, and I'm sure a lot of different things. That's exactly why dpratt and I called foul-ball on this 'analysis' or whatever (because the JVM was _designed_ to warm up and tune itself). Rule of thumb - G1 is great for throughput if you have a ton of extra RAM and want that extra oompf (i.e., Bank of America's probably running WebSphere in a straight G1 configuration). On your dev machines unless you fed some weird params to the VM, you're almost certainly running parallel or concurrent mark and sweep. Unless your'e running Java on a mobile device you're 99.99% not running in Incremental, and the only time the JVM would defer from concurrent m&s to the incremental m&s is if you had a lot of RAM and only one processor available (I don't think I've ever seen that mode in my life).