You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Paul Benedict <pb...@apache.org> on 2008/01/25 17:44:01 UTC

Final Memory

What does the "Final Memory" detail represent when Maven finishes? I can't
find any documentation on what the two numbers mean.

[INFO] Final Memory: 1M/4M

Paul

Re: Final Memory

Posted by Paul Benedict <pb...@apache.org>.
Looks like I finally figured out through experience too...

First number is the actual memory used within the heap, second number
is the total heap size allocated to Java. You can control the second
number with MAVEN_OPTS using the JVM setting -Xms option.

Paul

On Thu, Dec 18, 2008 at 10:42 PM, Stuart McCulloch <mc...@gmail.com> wrote:
> 2008/12/19 Paul Benedict <pb...@apache.org>
>
>> I never figured it out. I'd still like to know!
>>
>
> browsing the source for 2.0.9 shows:
>
>  getLogger().info(
>    "Final Memory: " + ( r.totalMemory() - r.freeMemory() ) / MB + "M/" +
> r.totalMemory() / MB + "M" );
>
> where r = Runtime.getRuntime()
>
> so the first number is the memory actually in use at the time of the
> message, and the second is the total amount of memory (both used +
> available)
>
> see:
>
>
> http://svn.apache.org/repos/asf/maven/components/tags/maven-2.0.9/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
>
> and:
>
>
> http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#freeMemory()
>
> Paul
>>
>> On Tue, Dec 16, 2008 at 2:01 PM, Wayne Fay <wa...@gmail.com> wrote:
>> >>> What does the "Final Memory" detail represent when Maven finishes? I
>> can't
>> >>> find any documentation on what the two numbers mean.
>> >>>
>> >>> [INFO] Final Memory: 1M/4M
>> >
>> > I'm not certain, but I'd expect the first number to be "amount of
>> > memory currently consumed when this INFO log was generated" and the
>> > second to be "the largest amount of memory consumed during the build."
>> > Or something along those lines. I've never paid a lot of attention to
>> > it, to be honest.
>> >
>> > You could probably grep the Maven source and find it pretty quickly,
>> > if you cared enough. (If someone does that and finds out the answer,
>> > please post it.)
>> >
>> > Wayne
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
> --
> Cheers, Stuart
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Final Memory

Posted by Stuart McCulloch <mc...@gmail.com>.
2008/12/19 Paul Benedict <pb...@apache.org>

> I never figured it out. I'd still like to know!
>

browsing the source for 2.0.9 shows:

  getLogger().info(
    "Final Memory: " + ( r.totalMemory() - r.freeMemory() ) / MB + "M/" +
r.totalMemory() / MB + "M" );

where r = Runtime.getRuntime()

so the first number is the memory actually in use at the time of the
message, and the second is the total amount of memory (both used +
available)

see:


http://svn.apache.org/repos/asf/maven/components/tags/maven-2.0.9/maven-core/src/main/java/org/apache/maven/DefaultMaven.java

and:


http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#freeMemory()

Paul
>
> On Tue, Dec 16, 2008 at 2:01 PM, Wayne Fay <wa...@gmail.com> wrote:
> >>> What does the "Final Memory" detail represent when Maven finishes? I
> can't
> >>> find any documentation on what the two numbers mean.
> >>>
> >>> [INFO] Final Memory: 1M/4M
> >
> > I'm not certain, but I'd expect the first number to be "amount of
> > memory currently consumed when this INFO log was generated" and the
> > second to be "the largest amount of memory consumed during the build."
> > Or something along those lines. I've never paid a lot of attention to
> > it, to be honest.
> >
> > You could probably grep the Maven source and find it pretty quickly,
> > if you cared enough. (If someone does that and finds out the answer,
> > please post it.)
> >
> > Wayne
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Cheers, Stuart

Re: Final Memory

Posted by Paul Benedict <pb...@apache.org>.
I never figured it out. I'd still like to know!

Paul

On Tue, Dec 16, 2008 at 2:01 PM, Wayne Fay <wa...@gmail.com> wrote:
>>> What does the "Final Memory" detail represent when Maven finishes? I can't
>>> find any documentation on what the two numbers mean.
>>>
>>> [INFO] Final Memory: 1M/4M
>
> I'm not certain, but I'd expect the first number to be "amount of
> memory currently consumed when this INFO log was generated" and the
> second to be "the largest amount of memory consumed during the build."
> Or something along those lines. I've never paid a lot of attention to
> it, to be honest.
>
> You could probably grep the Maven source and find it pretty quickly,
> if you cared enough. (If someone does that and finds out the answer,
> please post it.)
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Final Memory

Posted by Wayne Fay <wa...@gmail.com>.
>> What does the "Final Memory" detail represent when Maven finishes? I can't
>> find any documentation on what the two numbers mean.
>>
>> [INFO] Final Memory: 1M/4M

I'm not certain, but I'd expect the first number to be "amount of
memory currently consumed when this INFO log was generated" and the
second to be "the largest amount of memory consumed during the build."
Or something along those lines. I've never paid a lot of attention to
it, to be honest.

You could probably grep the Maven source and find it pretty quickly,
if you cared enough. (If someone does that and finds out the answer,
please post it.)

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Final Memory

Posted by Anil-C <ac...@gmail.com>.
Hi Paul,

I was looking exactly for the same question. Did you get an answer to this?

Thanks
Anil


Paul Benedict-2 wrote:
> 
> What does the "Final Memory" detail represent when Maven finishes? I can't
> find any documentation on what the two numbers mean.
> 
> [INFO] Final Memory: 1M/4M
> 
> Paul
> 
> 

-- 
View this message in context: http://www.nabble.com/Final-Memory-tp15091792p21039789.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org