struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Filion <mfil...@csc.com>
Subject Re: [S2] App generate lot (2GB) of garbage!
Date Tue, 19 Jun 2007 18:00:35 GMT
Without knowing much more about your application I dont know if we are 
going to be of much more help. Especially since most people here already 
have struts 2 apps running and dont have this issue. I have a couple of 
resources that might help you though while you dig through this issue.

You can see some of the source on the objects referanced in your memory 
trace. Seeing the source of other objects is some times helpful.
http://www.koders.com/?s=freemarker.ext.util.ModelFactory&la=Java

It looks like you already have this one cause you mention addressing a 
couple of the items. The last one mentions using velocity tags over struts 
tags not sure if this would be your issue, but might be worth looking at.
http://struts.apache.org/2.x/docs/performance-tuning.html

Matt Filion
CSC - GTS --> Raytheon - ISF
mfilion@csc.com


--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 
e-mail for such purpose.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------




"Ing. Andrea Vettori" <mail@andreavettori.com> 
06/19/2007 02:19 AM
Please respond to
"Struts Users Mailing List" <user@struts.apache.org>


To
"Struts Users Mailing List" <user@struts.apache.org>
cc

Subject
Re: [S2] App generate lot (2GB) of garbage!






Anyone ?

Anyone knows who's calling freemarker.ext.beans methods ?


Il giorno 17/giu/07, alle ore 19:08, Ing. Andrea Vettori ha scritto:

> Hi,
> I've a struts 2.0.8 app that runs on Linux and JBoss 4.0.5. I'ts an 
> e-commerce site.
>
> I have the following problem.
> The app seems to generate lot of garbage in RAM (young gen) that 
> the gc correctly collects.
> But when there is more than a few users on the site, that amount of 
> garbage is generated about every 10 seconds or less depending on 
> the number of users. This cause a lot of cpu usage...
>
> Tracking the memory usage with the hprof agent I found that a lot 
> of memory is used by freemarker.* classes on HashMaps.
>
> I have devMode turned off, have the "template" dir on the root of 
> the war file and I have the freemarker.properties file into the 
> classes dir inside WEB-INF with template_update_delay=60000.
>
> Any hint on WHY the application is generating such big amount of 
> garbage ?
>
> Thank you
>
> Here is top memory usage and relative traces :
>
>
> bytes 192,090,608
> obj number: 1,263,754
> class: java.util.HashMap$Entry[]
>
> TRACE 352396:
>                java.util.HashMap.<init>(HashMap.java:203)
>                freemarker.ext.beans.BeanModel.<init>(BeanModel.java:117)
> freemarker.ext.beans.StringModel.<init>(StringModel.java:90)
> freemarker.ext.beans.StringModel$1.create(StringModel.java:75)
>
>
> bytes: 143,560,048
> obj number: 944,474
> class: java.util.HashMap$Entry[]
>
> TRACE 352387:
>                java.util.HashMap.<init>(HashMap.java:203)
>                freemarker.ext.beans.BeanModel.<init>(BeanModel.java:117)
> freemarker.ext.beans.StringModel.<init>(StringModel.java:90)
>                freemarker.ext.beans.MapModel.<init>(MapModel.java:105)
>
>
> bytes: 141,327,104
> obj number: 2,208,236
> class: java.util.HashMap
>
> TRACE 352386:
>                java.util.AbstractMap.<init>(AbstractMap.java:53)
>                java.util.HashMap.<init>(HashMap.java:200)
>                freemarker.ext.beans.BeanModel.<init>(BeanModel.java:117)
> freemarker.ext.beans.StringModel.<init>(StringModel.java:90)
>
>
>
> --
> Ing. Andrea Vettori
> Consulente per l'Information Technology
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>

--
Ing. Andrea Vettori
Consulente per l'Information Technology



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message