Tag Archives: java

JVM Tuning – Garbage Collection

As new objects are created, they are placed in the Java Heap, and as far as a Java application programmer is concerned, that’s the end of the story. When the objects are no longer being used, they’ll magically die off … Continue reading

Posted in java | Tagged , , , , , | Leave a comment

Useful JVM Garbage Collector Settings

Concurrent Mark-Sweep Collector This tends to give good all-round performance JVM -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+UseParNewGC NetBeans or Eclipse -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+UseParNewGC Garbage-First Collector This gives the best all-round performance, for larger multi-core boxen. The downside is that it’s new… JVM -XX:+UnlockExperimentalVMOptions … Continue reading

Posted in java | Tagged , , , , , | Leave a comment

The dreaded printStackTrace()

Ah, the ubiquitous ex.printStackTrace(). Does this look familiar? try { // something } catch (Exception ex) { ex.printStackTrace(); } I will assume the the (ab)users of this construct are familiar with the various logging systems available, the mostĀ prevalentĀ of which are: … Continue reading

Posted in java | Tagged , , , , | Leave a comment