I\'m confused with Heap,Young,Tenured and Perm generation.
Could anyone please explain?
Here's another excellent (though long) article on how to tune/size your GC parameters, which may help you understand even more:
https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/
A very useful read if you're having GC issues and need to know how to read GC logs, or need to understand how your current GC collector works.
If you want to hook up remote monitoring of a running system to see realtime memory usage and GC runs check this tool out:
http://java.sun.com/performance/jvmstat/visualgc.html