You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by P....@albourne.com on 2010/11/03 14:02:57 UTC
Re: Memory creep
> can you give me some
>> detail on how to go about that?
Just invoke System.gc();
regards,
Peter
----- Original Message -----
From: "Thiago H. de Paula Figueiredo" <th...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Friday, 29 October, 2010 20:55:03 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Re: Memory creep
On Fri, 29 Oct 2010 15:30:23 -0200, Josh Canfield <jo...@gmail.com>
wrote:
>> but your suggestion of forcing garbage collection - can you give me some
>> detail on how to go about that?
>
> http://download.oracle.com/javase/6/docs/technotes/guides/management/jconsole.html
VisualVM (https://visualvm.dev.java.net/) has a very nice GUI for it.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
RE: Memory creep
Posted by Jim O'Callaghan <jc...@yahoo.co.uk>.
Thanks for the info Howard. It's working out very well so far - very happy
with 5.2.1.
Regards,
Jim.
-----Original Message-----
From: Howard Lewis Ship [mailto:hlship@gmail.com]
Sent: 03 November 2010 16:40
To: Tapestry users
Subject: Re: Memory creep
FYI: Using either jconsole of VisualVM you can force a GC remotely. In
general, Tapestry is very good about memory management (though it likes to
use a lot of it). There are a few user coding errors that can "trap" objects
that should be reclaimed, but you have to work a bit hard to hit those.
The biggest memory issue is the heavy use of PermGen space, especially under
development. Java is very reticent about GC'ing PermGen, even when you
request a GC explicitly.
On Wed, Nov 3, 2010 at 6:29 AM, Jim O'Callaghan
<jc...@yahoo.co.uk>wrote:
> Thanks for the suggestions guys. Josh was right in that what I was seeing
> was not a problem, just what I thought was a problem. I reduced my heap
> from about 1.5GB down to 512MB and saw GC happening as expected and no
OOMEs
> with a moderate consistent load on the app. I think I got the idea that
it
> needed a lot of headroom from the dev environment, where production mode
was
> disabled, and live class reloading uses up a lot of space (I think),
> otherwise the process was crashing with heap issues. Thiago, your
> suggestion of using VisualVM was very helpful - a very good tool. It
looks
> like Tapestry (at least 5.2.1) is very good at releasing resources - my
heap
> size vs. used heap is consistently bouncing between predictable levels
even
> after running tests 24 hours over a few days. Very happy with the result.
> Summary, the creep was me misinterpreting the heap growing because I gave
> it so much headroom it never really needed to GC.
>
> Regards,
> Jim.
>
> -----Original Message-----
> From: Ivano Luberti [mailto:luberti@archicoop.it]
> Sent: 03 November 2010 13:11
> To: users@tapestry.apache.org
> Subject: Re: Memory creep
>
> and make sure you trap the exception that can be thrown
>
> Il 03/11/2010 14.02, P.Stavrinides@albourne.com ha scritto:
> >> can you give me some
> >>> detail on how to go about that?
> > Just invoke System.gc();
> >
> > regards,
> > Peter
> >
> >
> >
> > ----- Original Message -----
> > From: "Thiago H. de Paula Figueiredo" <th...@gmail.com>
> > To: "Tapestry users" <us...@tapestry.apache.org>
> > Sent: Friday, 29 October, 2010 20:55:03 GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> > Subject: Re: Memory creep
> >
> > On Fri, 29 Oct 2010 15:30:23 -0200, Josh Canfield <
> joshcanfield@gmail.com>
> > wrote:
> >
> >>> but your suggestion of forcing garbage collection - can you give me
> some
> >>> detail on how to go about that?
> >>
>
http://download.oracle.com/javase/6/docs/technotes/guides/management/jconsol
e.html
> > VisualVM (https://visualvm.dev.java.net/) has a very nice GUI for it.
> >
>
> --
> ==================================================
> dott. Ivano Mario Luberti
> Archimede Informatica societa' cooperativa a r. l.
> Sede Operativa
> Via Gereschi 36 - 56126- Pisa
> tel.: +39-050- 580959
> tel/fax: +39-050-9711344
> web: www.archicoop.it
> ==================================================
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Howard M. Lewis Ship
Creator of Apache Tapestry
The source for Tapestry training, mentoring and support. Contact me to learn
how I can get you up and productive in Tapestry fast!
(971) 678-5210
http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Memory creep
Posted by Howard Lewis Ship <hl...@gmail.com>.
FYI: Using either jconsole of VisualVM you can force a GC remotely. In
general, Tapestry is very good about memory management (though it likes to
use a lot of it). There are a few user coding errors that can "trap" objects
that should be reclaimed, but you have to work a bit hard to hit those.
The biggest memory issue is the heavy use of PermGen space, especially under
development. Java is very reticent about GC'ing PermGen, even when you
request a GC explicitly.
On Wed, Nov 3, 2010 at 6:29 AM, Jim O'Callaghan <jc...@yahoo.co.uk>wrote:
> Thanks for the suggestions guys. Josh was right in that what I was seeing
> was not a problem, just what I thought was a problem. I reduced my heap
> from about 1.5GB down to 512MB and saw GC happening as expected and no OOMEs
> with a moderate consistent load on the app. I think I got the idea that it
> needed a lot of headroom from the dev environment, where production mode was
> disabled, and live class reloading uses up a lot of space (I think),
> otherwise the process was crashing with heap issues. Thiago, your
> suggestion of using VisualVM was very helpful - a very good tool. It looks
> like Tapestry (at least 5.2.1) is very good at releasing resources - my heap
> size vs. used heap is consistently bouncing between predictable levels even
> after running tests 24 hours over a few days. Very happy with the result.
> Summary, the creep was me misinterpreting the heap growing because I gave
> it so much headroom it never really needed to GC.
>
> Regards,
> Jim.
>
> -----Original Message-----
> From: Ivano Luberti [mailto:luberti@archicoop.it]
> Sent: 03 November 2010 13:11
> To: users@tapestry.apache.org
> Subject: Re: Memory creep
>
> and make sure you trap the exception that can be thrown
>
> Il 03/11/2010 14.02, P.Stavrinides@albourne.com ha scritto:
> >> can you give me some
> >>> detail on how to go about that?
> > Just invoke System.gc();
> >
> > regards,
> > Peter
> >
> >
> >
> > ----- Original Message -----
> > From: "Thiago H. de Paula Figueiredo" <th...@gmail.com>
> > To: "Tapestry users" <us...@tapestry.apache.org>
> > Sent: Friday, 29 October, 2010 20:55:03 GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> > Subject: Re: Memory creep
> >
> > On Fri, 29 Oct 2010 15:30:23 -0200, Josh Canfield <
> joshcanfield@gmail.com>
> > wrote:
> >
> >>> but your suggestion of forcing garbage collection - can you give me
> some
> >>> detail on how to go about that?
> >>
> http://download.oracle.com/javase/6/docs/technotes/guides/management/jconsole.html
> > VisualVM (https://visualvm.dev.java.net/) has a very nice GUI for it.
> >
>
> --
> ==================================================
> dott. Ivano Mario Luberti
> Archimede Informatica societa' cooperativa a r. l.
> Sede Operativa
> Via Gereschi 36 - 56126- Pisa
> tel.: +39-050- 580959
> tel/fax: +39-050-9711344
> web: www.archicoop.it
> ==================================================
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Howard M. Lewis Ship
Creator of Apache Tapestry
The source for Tapestry training, mentoring and support. Contact me to learn
how I can get you up and productive in Tapestry fast!
(971) 678-5210
http://howardlewisship.com
Re: Memory creep
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Wed, 03 Nov 2010 11:29:18 -0200, Jim O'Callaghan
<jc...@yahoo.co.uk> wrote:
> Thiago, your suggestion of using VisualVM was very helpful - a very
> good tool.
:)
> It looks like Tapestry (at least 5.2.1) is very good at releasing
> resources - my heap size vs. used heap is consistently bouncing between
> predictable levels even after running tests 24 hours over a few days.
> Very happy with the result.
This seems consistent with the experiments described here:
http://blog.gidley.co.uk/2009/05/tapestry-load-testing-longer-runs.html.
These experiments were made with T5.1, which still had a page pool, while
5.2 doesn't. It would be nice to have them repeated with 5.2. Gidley, are
you listening? :)
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
RE: Memory creep
Posted by Jim O'Callaghan <jc...@yahoo.co.uk>.
Thanks for the suggestions guys. Josh was right in that what I was seeing was not a problem, just what I thought was a problem. I reduced my heap from about 1.5GB down to 512MB and saw GC happening as expected and no OOMEs with a moderate consistent load on the app. I think I got the idea that it needed a lot of headroom from the dev environment, where production mode was disabled, and live class reloading uses up a lot of space (I think), otherwise the process was crashing with heap issues. Thiago, your suggestion of using VisualVM was very helpful - a very good tool. It looks like Tapestry (at least 5.2.1) is very good at releasing resources - my heap size vs. used heap is consistently bouncing between predictable levels even after running tests 24 hours over a few days. Very happy with the result. Summary, the creep was me misinterpreting the heap growing because I gave it so much headroom it never really needed to GC.
Regards,
Jim.
-----Original Message-----
From: Ivano Luberti [mailto:luberti@archicoop.it]
Sent: 03 November 2010 13:11
To: users@tapestry.apache.org
Subject: Re: Memory creep
and make sure you trap the exception that can be thrown
Il 03/11/2010 14.02, P.Stavrinides@albourne.com ha scritto:
>> can you give me some
>>> detail on how to go about that?
> Just invoke System.gc();
>
> regards,
> Peter
>
>
>
> ----- Original Message -----
> From: "Thiago H. de Paula Figueiredo" <th...@gmail.com>
> To: "Tapestry users" <us...@tapestry.apache.org>
> Sent: Friday, 29 October, 2010 20:55:03 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
> Subject: Re: Memory creep
>
> On Fri, 29 Oct 2010 15:30:23 -0200, Josh Canfield <jo...@gmail.com>
> wrote:
>
>>> but your suggestion of forcing garbage collection - can you give me some
>>> detail on how to go about that?
>> http://download.oracle.com/javase/6/docs/technotes/guides/management/jconsole.html
> VisualVM (https://visualvm.dev.java.net/) has a very nice GUI for it.
>
--
==================================================
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Memory creep
Posted by Ivano Luberti <lu...@archicoop.it>.
and make sure you trap the exception that can be thrown
Il 03/11/2010 14.02, P.Stavrinides@albourne.com ha scritto:
>> can you give me some
>>> detail on how to go about that?
> Just invoke System.gc();
>
> regards,
> Peter
>
>
>
> ----- Original Message -----
> From: "Thiago H. de Paula Figueiredo" <th...@gmail.com>
> To: "Tapestry users" <us...@tapestry.apache.org>
> Sent: Friday, 29 October, 2010 20:55:03 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
> Subject: Re: Memory creep
>
> On Fri, 29 Oct 2010 15:30:23 -0200, Josh Canfield <jo...@gmail.com>
> wrote:
>
>>> but your suggestion of forcing garbage collection - can you give me some
>>> detail on how to go about that?
>> http://download.oracle.com/javase/6/docs/technotes/guides/management/jconsole.html
> VisualVM (https://visualvm.dev.java.net/) has a very nice GUI for it.
>
--
==================================================
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org