Can someone explain me what does the Final Memory means in the maven output:-
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 09:17 min (Wall Clock)
[INFO] Finished at: 2017-07-03T17:34:54+05:30
[INFO] Final Memory: 596M/2016M
[INFO] ------------------------------------------------------------------------
Is it the peak memory usage of maven during the execution? If yes then when I execute maven like below:-
/usr/bin/time -l mvn clean package
it reports maximum resident set size
as 3671834624 bytes.
Can someone also let me know why the two numbers are different and how can I obtain the peak memory usage of a maven execution?
Environment:-
Final memory is calculated like this:
r = Runtime.getRuntime()
getLogger().info(
"Final Memory: " + ( r.totalMemory() - r.freeMemory() ) / MB + "M/" + r.totalMemory() / MB + "M" );
So the first number is the memory actually in use at time of the message, and second one is the total amount of memory (both used + available)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With