The biggest difference between the two that I know of is the amount of garbage collected.
Regular garbage collection, including System.gc() , collects some garbage and then stops. This is not full heap coverage to get rid of everything. That is, try to minimize the impact of the CPU on garbage collection.
A heap dump prepared for MAT, however, is effectively a full GC.
Your symptoms indicate that you are allocating memory faster than the GC can recover it. The main solution for this is to try to allocate less memory or allocate it less often. For example, where possible, reusing objects, bitmap buffers, etc., instead of trying to let the GC clear old stuff and highlight new things along the way.
source share