tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Maximum number of JSP ?
Date Fri, 11 Apr 2014 14:09:54 GMT
 > Any suggestions/remarks ?

Yes, don't top-post.
So I'll move you, to show you how it's done here.

> -----Original Message-----
> From: André Warnier [] 
> Sent: Friday, April 11, 2014 7:01 PM
> To: Tomcat Users List
> Subject: Re: Maximum number of JSP ?
> Sylvain Goulmy wrote:
>> Hi,
>> I'm facing performance issue with my application which loads a very 
>> large number of different JSPs (ie 16 000). As the application loads 
>> the different JSP, the response time becomes longer and the CPU increases.
>> I have tried many configurations by modifying the maxLoadedJsp, 
>> PermgenSize, jspIdleTimeout parameters, but without having positive results.
>> I'd like to know if there are known limitations regarding the max 
>> number of JSP loaded in an application that could be used without 
>> facing performance issue ?
>> Configuration : Tomcat 7.0.52 with Oracle Java on Linux RHEL
> Hi.
> As a perpetual Java beginner, my first reaction upon reading that number of JPS's above
would be : let's enable Garbage Collector logging, and look at what it says.
> 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 ?
> As far as I first understand such things, each of these JSP's gets compiled into a servlet,
and the code of that servlet is held in memory for an extended period of time, even if unused
at any particular moment. So this is 16000 servlets probably coexisting (un-)happily inside
that JVM. No wonder..
> Or am I totally off the mark here, Tomcat/Java experts ?

Dutta, Abhishek 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 . So even if the transformation and 
compilation is done actual existence of unsed objects may not be the reason . So I am 
little bit skeptical about 16000 objects co-existing at the same time unused which is 
overloading the server.


Apart from that, note that I did not write "objects", you did. And I would not have talked

about "servlets being instantiated" either. With the slew of Java experts lurking on this

list, this kind of loose language could easily get you slapped.

But, notwithstanding the fact that I am not a Java expert, I would imagine that as more 
and more of these 16000 JSP's get "activated" through client requests, they get compiled,

thus generating executable (or let's say interpretable) code, which has to be stored 
somewhere, right ? and if you only have a limited amount of memory to play with (unless 
you work for the NSA or such), there may come a time where this may become a bottleneck, 
right ?  And then you've got (or rather the JVM has got) to start cleaning up, swapping 
things out and in, that kind of thing.  And that's usually not a very good thing for 
performance, however that is defined.
 From there my wondering about Garbage Collection and available memory.
To kind of set a base for the undoubtedly fruitful discussion that will certainly follow,

if I know this list at all.  Even on a Friday.

We have not even started talking about the instances of objects that these compiled JSP's

will be calling into existence when they are being invoked.
One thing at a time.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message