When it comes to optimizing GC, tuning is not the answer.
Did you ever consider that instances of other classes can sometimes be duplicate and waste a considerable amount of memory?
There are reasons you should not use numerous small objects in Java.
Want to learn more about detecting memory leaks from a JVM heap dump? Check out this post to learn more about Java and Garbage Collection.
What’s wrong with boxed numbers in Java? Check out this post to learn more about boxed numbers and how they can waste memory and create GC pressure for your applications.