thanks alot for your reply, but i can not resolve my problem.
>>Monitor Wicket page request using JAMon,
http://blog.xebia.com/2008/02/02/monitor-wicket-page-request-using-jamon/
it only trace the request time, but i mainly want to know why the
application session occupy so many memory.
>>try RequestLogger at first.
i add code in application init method
if(DEVELOPMENT.equalsIgnoreCase(getConfigurationType())){
//Get the logger
IRequestLoggerSettings reqLogger =
Application.get().getRequestLoggerSettings();
//Enable the logger
reqLogger.setRequestLoggerEnabled(true);
/**
* Set the window of all the requests that is kept in memory for
viewing. Default is 2000, You
* can set this to 0 then only Sessions data is recorded (number
of request, total time, latest
* size)
*/
reqLogger.setRequestsWindowSize(3000);
}
and add log4j configure as:
log4j.category.org.apache.wicket.protocol.http.RequestLogger
=debug,reqLogger
log4j.additivity.org.apache.wicket.protocol.http.RequestLogger=false
log4j.appender.reqLogger=org.apache.log4j.RollingFileAppender
log4j.appender.reqLogger.File=D:/517wm_data/logs/wicketRequestLogger.log
log4j.appender.reqLogger.MaxFileSize=10MB
log4j.appender.reqLogger.MaxBackupIndex=10
log4j.appender.reqLogger.layout=org.apache.log4j.PatternLayout
log4j.appender.reqLogger.layout.ConversionPattern=%d %-5p -
%-26.26c{1} - %m\n
here is result:
2009-08-14 22:17:47,421 INFO - RequestLogger -
time=78,event=null,response=[resourcestreamrequesttarget[resourcestream=org.apache.wicket.markup.html.dynamicwebresourc...@14d11bd,fileName=null],sessionid=15iahjrthemeq,sessionsize=258022,sessionstart=Fri
Aug 14 21:38:50 CST
2009,requests=129,totaltime=28780,activerequests=1,maxmem=266M,total=133M,used=113M
2009-08-14 22:17:48,546 INFO - RequestLogger -
time=109,event=Interface[target:ShareShopPage$LastestShopPanel$1$1(wmcNavigator:searchBox:panel:wmcLastestShopPanel:lastestShops:65:cols:68:shop),
page: wm.wicket.pages.shareshop.ShareShopPage(2), interface:
IBehaviorListener.onRequest],response=PageRequest[wm.wicket.pages.shareshop.ShareShopPage(2)],sessionid=15iahjrthemeq,sessionsize=240557,sessionstart=Fri
Aug 14 21:38:50 CST
2009,requests=130,totaltime=28889,activerequests=1,maxmem=266M,total=133M,used=118M
2009-08-14 22:17:48,734 INFO - RequestLogger -
time=63,event=null,response=[resourcestreamrequesttarget[resourcestream=org.apache.wicket.markup.html.dynamicwebresourc...@b9af2c,fileName=null],sessionid=15iahjrthemeq,sessionsize=240789,sessionstart=Fri
Aug 14 21:38:50 CST
2009,requests=131,totaltime=28952,activerequests=1,maxmem=266M,total=133M,used=120M
2009-08-14 22:17:50,484 INFO - RequestLogger -
time=141,event=Interface[target:ShareShopPage$LastestShopPanel$1$1(wmcNavigator:searchBox:panel:wmcLastestShopPanel:lastestShops:73:cols:75:shop),
page: wm.wicket.pages.shareshop.ShareShopPage(2), interface:
IBehaviorListener.onRequest],response=PageRequest[wm.wicket.pages.shareshop.ShareShopPage(2)],sessionid=15iahjrthemeq,sessionsize=269258,sessionstart=Fri
Aug 14 21:38:50 CST
2009,requests=132,totaltime=29093,activerequests=1,maxmem=266M,total=133M,used=119M
2009-08-14 22:17:50,953 INFO - RequestLogger -
time=141,event=null,response=[resourcestreamrequesttarget[resourcestream=org.apache.wicket.markup.html.dynamicwebresourc...@1f8f606,fileName=null],sessionid=15iahjrthemeq,sessionsize=269490,sessionstart=Fri
Aug 14 21:38:50 CST
2009,requests=133,totaltime=29234,activerequests=1,maxmem=266M,total=133M,used=121M
2009-08-14 22:17:52,250 INFO - RequestLogger -
time=125,event=Interface[target:ShareShopPage$LastestShopPanel$1$1(wmcNavigator:searchBox:panel:wmcLastestShopPanel:lastestShops:69:cols:71:shop),
page: wm.wicket.pages.shareshop.ShareShopPage(2), interface:
IBehaviorListener.onRequest],response=PageRequest[wm.wicket.pages.shareshop.ShareShopPage(2)],sessionid=15iahjrthemeq,sessionsize=252607,sessionstart=Fri
Aug 14 21:38:50 CST
2009,requests=134,totaltime=29359,activerequests=1,maxmem=266M,total=133M,used=118M
2009-08-14 22:17:52,468 INFO - RequestLogger -
time=62,event=null,response=[resourcestreamrequesttarget[resourcestream=org.apache.wicket.markup.html.dynamicwebresourc...@1b1af60,fileName=null],sessionid=15iahjrthemeq,sessionsize=252839,sessionstart=Fri
Aug 14 21:38:50 CST
2009,requests=135,totaltime=29421,activerequests=1,maxmem=266M,total=133M,used=120M
2009-08-14 22:17:52,968 INFO - RequestLogger -
time=140,event=Interface[target:ShareShopPage$LastestShopPanel$1$1(wmcNavigator:searchBox:panel:wmcLastestShopPanel:lastestShops:65:cols:67:shop),
page: wm.wicket.pages.shareshop.ShareShopPage(2), interface:
IBehaviorListener.onRequest],response=PageRequest[wm.wicket.pages.shareshop.ShareShopPage(2)],sessionid=15iahjrthemeq,sessionsize=295765,sessionstart=Fri
Aug 14 21:38:50 CST
2009,requests=136,totaltime=29561,activerequests=1,maxmem=266M,total=133M,used=120M
2009-08-14 22:17:53,359 INFO - RequestLogger -
time=141,event=null,response=[resourcestreamrequesttarget[resourcestream=org.apache.wicket.markup.html.dynamicwebresourc...@183f16d,fileName=null],sessionid=15iahjrthemeq,sessionsize=295997,sessionstart=Fri
Aug 14 21:38:50 CST
2009,requests=137,totaltime=29702,activerequests=1,maxmem=266M,total=133M,used=115M
but i can not get more information about page memory occupation detail, am i
miss something
finaly, i try to analyze memory using netbeans profilers(I am newbie to
profilers tool) follow as the link (
http://www.javaperformancetuning.com/tools/netbeansprofiler/), my question
is how to get wicket page memory size and session memory size from the
profilers tool, is there some document for more inforation.
Thanks alot again for your replies
2009/8/14 Peter Thomas <[email protected]>
> 2009/8/14 Martijn Dashorst <[email protected]>
>
> > I would suggest using a profiler to analyze memory snapshots for
> > retained objects. I believe netbeans comes with an adequate profiler,
> > and otherwise I'd suggest trying out yourkit (which has worked very
> > well at our company)
> >
> > Martijn
>
>
> Also if you take a heap-dump, the Eclipse Memory Analyzer tool has reports
> that try to identify the source of the leak / memory over-usage.
>
> More details here:
>
>
> http://ptrthomas.wordpress.com/2009/01/14/seam-jsf-vs-wicket-performance-comparison/
>
> Thanks,
>
> Peter.
>
>
> >
> >
> > 2009/8/14 新希望软件 -- 俞宏伟 <[email protected]>:
> > > sorry for my poor english.
> > >
> > > windows xp (32) + tomcat 6.x + Java 6 + wicket 1.3.7, tomcat memory
> > allocate
> > > 1G (computer's total memory is 3G),but tomcat frequently break because
> > of
> > > out of memory error when online user is about 100 .
> > >
> > > now, the list component including ListView,DataView, GridView use
> > > detachemodel, but i found that the temp session file size in disk is 8
> -
> > 10
> > > M, so i want to know how to monitor wicket's session memory usage
> detail.
> > >
> >
> >
> >
> > --
> > Become a Wicket expert, learn from the best: http://wicketinaction.com
> > Apache Wicket 1.4 increases type safety for web applications
> > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>