Ok

I changed the jboss configuration. I think it would be helpful to put an advice on the performance page of struts. If using jboss you should limit the debug string production with

   <category name="com.opensymphony">
      <priority value="INFO"/>
   </category>

   <category name="ognl">
      <priority value="INFO"/>
   </category>

   <category name="freemarker">
      <priority value="INFO"/>
   </category>


on log4j.xml

org.apache is already present in the default configuration.

I'll now try to profile the production server for a longer time and keep you informed.

Thank you



Il giorno 25/giu/07, alle ore 12:06, Al Sutton ha scritto:

The relevant piece of code is;

        if (LOG.isDebugEnabled()) {
            LOG.debug("Entering nullPropertyValue [target="+target+",
property="+property+"]");
        }

So the check is always present, but if the check is true (i.e. debug is on) it also has to build the log message from the components in the debug call (i.e. create "Entering nullPropertyValue [target=", then add the variable target, then add the string ", property=", then add the variable property,
then add the character "]"), which is what the StringBuilder is doing.

If the check is false, the call is not made, and the string doesn't need to be built, and hence no StringBuilder will be created, hence you'll see a
drop of over 5% in your Gced object count for exactly the same test.

-----Original Message-----
From: Ing. Andrea Vettori [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 10:36
To: Al Sutton
Subject: Re: [S2] App generate lot (2GB) of garbage!

I'm using jboss...

I'll try to find the configuration.

Just curious :
so in the source code the production of that strings are on a condition that
check the log4j configuration ?
This mean that the overhead of checking the condition is always present ?

Il giorno 25/giu/07, alle ore 11:33, Al Sutton ha scritto:

Are you using log4j in your app or your appserver (e.g. Jetty uses
it)?

If so look for a log4j.properties file which turns debug mode on with
a line similar to;

log4j.rootLogger=DEBUG

-----Original Message-----
From: Ing. Andrea Vettori [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 10:28
To: Struts Users Mailing List; Al Sutton
Subject: Re: [S2] App generate lot (2GB) of garbage!


Il giorno 25/giu/07, alle ore 11:21, Al Sutton ha scritto:

First thing I'd suggest; Turn off debug mode!!!!! It seems a chunk of the Gced objects are coming from preparing strings for log statements
which are only activated when debug mode is on (for example;
Com.opensymphony.xwork2.util.InstantiatingNullHandler.nullPropertyVa l
u
e(Map,
Object, Object) accounts for 5% of Gced objects, of which nearly the
entire 5% comes from StringBuilter and Log4JLoggerdebug which are
only used when debug mode is on).

How ??? devMode is already false in struts.xml

I've noticed that's a lot of log4j calls but don't know if they can be
removed!

Thanks



Secondly it does seem as though there's anything wildly wrong here,
there aren't any single methods which have large Gced object counts
indicating there isn't a big bottleneck (yes, some show 30+%, but
that's fairly evenly divided between the methods called by the 30+%
method), which leads me to one question, how much data are you trying
to output? Can you do a "Save Source" and tell me the size of the
HTML file generated?, can you also provide the call tree with a call
count so we can see how many times the methods are being executed?

Thanks,

Al.



-----Original Message-----
From: Ing. Andrea Vettori [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 09:35
To: Struts Users Mailing List
Subject: Re: [S2] App generate lot (2GB) of garbage!


Il giorno 25/giu/07, alle ore 09:50, Al Sutton ha scritto:

Your trace is at too higher level. Can you put a fully expanded copy
of your trace that goes down to the leaf methods.

Done. It's on traceall.html. I expanded only the two most garbage
producing top call.

Thank you

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



-------------------------------------------------------------------- -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-------------------------------------------------------------------- -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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




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




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to