You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Stefan Kanev <st...@gmail.com> on 2007/10/08 11:12:01 UTC

Profiling the memory usage

Hi.

I'm doubting that my wicket application is using to much memory because of
serializing too much unnecessary stuff in the session (programmers'
mistakes). Can you help me find a way to see what objects get serialized, so
I can see what I'm doing wrong and correct my mistakes?

Thanks in advance.

/Stefan

Re: Profiling the memory usage

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
also im not sure if the  wicket jmx panel could help you here?

Nino Saturnino Martinez Vazquez Wael wrote:
> Look in filepagestore, if youre using the default..
>
> -Nino
>
> Stefan Kanev wrote:
>> Hi.
>>
>> I'm doubting that my wicket application is using to much memory 
>> because of
>> serializing too much unnecessary stuff in the session (programmers'
>> mistakes). Can you help me find a way to see what objects get 
>> serialized, so
>> I can see what I'm doing wrong and correct my mistakes?
>>
>> Thanks in advance.
>>
>> /Stefan
>>
>>   
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Profiling the memory usage

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Look in filepagestore, if youre using the default..

-Nino

Stefan Kanev wrote:
> Hi.
>
> I'm doubting that my wicket application is using to much memory because of
> serializing too much unnecessary stuff in the session (programmers'
> mistakes). Can you help me find a way to see what objects get serialized, so
> I can see what I'm doing wrong and correct my mistakes?
>
> Thanks in advance.
>
> /Stefan
>
>   

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


Re: Profiling the memory usage

Posted by Eelco Hillenius <ee...@gmail.com>.
On 10/16/07, Nino Saturnino Martinez Vazquez Wael
<ni...@jayway.dk> wrote:
> Well said:) Sometimes I just take a wrong turn while wanting to explain
> something, and get stuck in that idea.
>
> About the wicket-objectsizeof-agent, could it be used to make a small
> wicket diagnostics contribution..? I mean can it walk over live wicket
> applications and tell how much individual part were using? Or are some
> one already doing this?

You could implement this through a custom session store. The
wicket-objectsizeof-agent project only plugs in a
'IObjectsSizeOfStrategy' that is based on instrumentation rather then
serialization. That strategy is used by
org.apache.wicket.util.lang.Objects#sizeOf(Object).

But again, using a profiler is probably much easier and gives better results.

Eelco

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


Re: Profiling the memory usage

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Well said:) Sometimes I just take a wrong turn while wanting to explain 
something, and get stuck in that idea.

About the wicket-objectsizeof-agent, could it be used to make a small 
wicket diagnostics contribution..? I mean can it walk over live wicket 
applications and tell how much individual part were using? Or are some 
one already doing this?

regards Nino

Eelco Hillenius wrote:
>> I'm doubting that my wicket application is using to much memory because of
>> serializing too much unnecessary stuff in the session (programmers'
>> mistakes). Can you help me find a way to see what objects get serialized, so
>> I can see what I'm doing wrong and correct my mistakes?
>>     
>
> Imho the best answer here is: use a profiler, preferably together with
> load testing (e.g. write a JMeter script). In my experience, it is
> very hard to make good estimates based on measuring individual objects
> (note that we even have a separate project for doing slightly more
> reliable measuring, see
> https://svn.apache.org/repos/asf/wicket/trunk/jdk-1.5/wicket-objectssizeof-agent)
> and looking at what the page store saves isn't a good indication for
> heap usage either.
>
> YourKit and JMeter work great for me.
>
> Eelco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>   

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


Re: Profiling the memory usage

Posted by Eelco Hillenius <ee...@gmail.com>.
> I'm doubting that my wicket application is using to much memory because of
> serializing too much unnecessary stuff in the session (programmers'
> mistakes). Can you help me find a way to see what objects get serialized, so
> I can see what I'm doing wrong and correct my mistakes?

Imho the best answer here is: use a profiler, preferably together with
load testing (e.g. write a JMeter script). In my experience, it is
very hard to make good estimates based on measuring individual objects
(note that we even have a separate project for doing slightly more
reliable measuring, see
https://svn.apache.org/repos/asf/wicket/trunk/jdk-1.5/wicket-objectssizeof-agent)
and looking at what the page store saves isn't a good indication for
heap usage either.

YourKit and JMeter work great for me.

Eelco

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