Hello, I wondered about that as well. It was discussed 2012 on maven-dev. The statement looks like this:
# Runtime r = Runtime.getRuntime(); # long MB = 1024 * 1024; # "Final Memory: " + ( r.totalMemory() - r.freeMemory() ) / MB + "M/" + r.totalMemory() / MB + "M" So this basically prints the currently used memory (which is pretty useless as it depends on the last time the GC was run) and the memory commit. This is the largest memory needed before a GC was kicked off. The later one should be a pretty usefull indicator of the commited memory. It is as least as big as Xms, so you should set it low. It is however not an indication if you can decrease Xmx. If it tells you the total memory commited was 1,5GB it is possible that it would run with Xmx 1G as well. Gruss Bernd Am Sun, 17 Apr 2016 17:50:05 +0200 schrieb Karl Heinz Marbaise <[email protected]>: > Hi to all, > > i have a question concerning the memory consumption... > > If i run maven with the same JDK and the same reactor and build with > the same parameter and plugins... > > will the printout at the end of the build (Final Memory) something > realiable about the consumption of the JVM during the build ?...Or is > it at least a hint...or would i need to do something different (BTW: > Someone has a hint about that?) ... > > > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 6.431 s > [INFO] Finished at: 2016-04-17T17:46:58+02:00 > [INFO] Final Memory: 47M/638M > > So if i ran the same build with different Maven versions so could > this give us a hint where more memory is consumed ...(to identify > where and why is a different story)... > > Kind regards > Karl Heinz > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
