Hi,

Thank you all for your returns.

Maybe also, just to give us an idea, you could tell us how much memory that
> system has, and how much is given to use by Tomcat ?


Xmx is 1500 Mo. The PermSize is set so that it can easily load the max
number of JSP set with the maxLoadedJsp (set to 5000) parameter.

1. Personally I am pessimistic about 'maxLoadedJsps' option, because
> even if you unload a JSP, the strings used in its code will still
> remain in JVM constant strings pool.  Anyway, I expect the best
> performance would be if you do not try unloading the JSPs.
> 2. Did you set development=false on JspServlet?
>
> http://tomcat.apache.org/tomcat-7.0-doc/jasper-howto.html#Production_Configuration
> Note: I would not recommend using 'genStringAsCharArray',
> 3. There are a number of ways to monitor your memory usage.
> 4. Does the number of requests remain the same and only the number of
> JSPs increases? How much is "longer" in "the response time becomes
> longer" ?


1. This is indeed a scenario i want to test, ie to size the PermGen so it
can load all the JSP without having to unload them. This could require a
huge PermGen size that i have to assess.

2. development=false and i don't use the "genStringAsCharArray" parameter

3. I'm using many tools which allows me to monitor the GC behaviour

4. Here is the behaviour that i observed : i request the URL of a jsp in a
loop. The content of this JSP is always the same but it's name is different
in each URL so that it is considered as a new one. This JSP is quite big
(100 ko). Here is the evolution of the response time :

- First call : 70 ms
- 1000th call : 100ms
- 2000th call : 140 ms
- 3000th call : 200 ms

The more the permgen hosts many JSP, the more the response time increases.
On this test, the PermGen was big enough to host all the JSP and the
maxLoadedJsp
parameter is set to 5000.

Is this performance problem something you didn't have before today?


No indeed, we were on a different technology (Websphere).


On Fri, Apr 11, 2014 at 5:11 PM, Leo Donahue <donahu...@gmail.com> wrote:

> On Fri, Apr 11, 2014 at 6:46 AM, Dutta, Abhishek <
> abhishek.du...@capgemini.com> wrote:
>
> > Hi,
> >
> > I am not very sure . But I guess If we consider the servlet lifecycle the
> > servlet is not supposed to get instantiated until requested for .
> >
> >
> The question is, do the JSP pages contain static text or JSP elements?
>
> Either way, a JSP will be converted to a servlet in the container.
>
> When a request for the JSP is made, the container will check to see if the
> JSP page's servlet is older than the JSP page, and if it is, then the JSP
> page gets re-compiled.
> http://docs.oracle.com/javaee/5/tutorial/doc/bnahe.html
>
> Now you are going through the servlet life cycle for each JSP page that is
> newer than it's servlet.  And you also have spawned 16,000 threads in this
> application.  One for each init() method of those servlets.
>
> Is this performance problem something you didn't have before today?
>

Reply via email to