I thought 1 vs many servlets were brought up a while back (possibly late
July), the conclusion was that it was VM dependent if I remember
correctly.

-----Original Message-----
From: Tim Moore [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 19, 2002 2:17 PM
To: Tomcat Users List
Subject: RE: in search of more efficient design

Maybe a bit more than one word would be more helpful. ;-)

Instead of having 60 - 70 servlet classes, you could have one servlet
with 60 - 70 delegates that are loaded on demand.  Struts includes the
main servlet, and basically consists of a framework for creating and
invoking those delegate classes.  I'm not sure, though, whether they're
actually loaded (and unloaded) on demand, or whether it loads on startup
and keeps them all in memory.  I have a feeling that it's half & half:
loads on demand, but then keeps them in memory until the webapp is
restarted.  Maybe Craig can comment.

It's also worth noting that the memory freed from garbage collecting
objects in Java isn't returned to the OS, but kept as the VMs free
internal heap space.  So just because the VM shows that it's using 500M
of space doesn't mean that there are actually 500M of objects in memory.
If there was high load at some earlier point that pushed it up to 500,
it will stay there until you restart the VM.  I don't know if that's
relevant to your case, though.

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


> -----Original Message-----
> From: Jacob Hookom [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, December 19, 2002 3:07 PM
> To: 'Tomcat Users List'
> Subject: RE: in search of more efficient design
> 
> 
> One word... struts
> 
> -----Original Message-----
> From: ilasno [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, December 19, 2002 1:29 PM
> To: [EMAIL PROTECTED]
> Subject: in search of more efficient design
> 
>  PREAMBLE - I apologize if this is off-topic.  I have been on this 
> search for a month, and have searched the web far and wide, but have 
> mostly found either J2EE design recommendations (higher-level 
> than i am 
> prepared to explore right now) or software vendors trying to sell me 
> load-testing programs.  I would appreciate pointers to 
> self-enlightenment sites almost as much as more specific guidance.
> 
> SHORT VERSION - I am a beginner-intermediate webapp designer, and my 
> first large-scale development is using around 500 mb of 
> memory, with low
> 
> client load.  I am seeking ways to both measure where this extreme 
> resource-usage is stemming from and design tips to bring it down.
> 
> LONG VERSION - The site I am developing is for a company that 
> wishes to 
> be able to change/update portions of their site through a web-based 
> private section of their site.  The result is an extensive admin 
> implemented through a combination of jsp pages (for forms, 
> and feedback)
> 
> and corresponding servlets (for processing and database 
> updating through
> 
> db-access modules).  The admin section is obviously much 
> bigger and more
> 
> resource-intensive than the public portion, which just hits 
> the database
> 
> once-an-hour for updates and displays the current data.  Conversely, 
> while the admin section is much larger (many more servlets 
> with larger 
> file sizes, more processing), it is obviously used much less 
> (one or two
> 
> users per day as opposed to many per day for the public portion).  I 
> have steered away from keeping variables global within servlets 
> (including db-access module instances), so that within a 
> doGet or doPost
> 
> everything i need is created, and then i am assuming when the method 
> ends everything is garbage-collected?  is it possible to have 
> that much 
> memory used just to hold 60 or 70 servlets ready for requests?  I am 
> wondering if my design is flawed, or a bad idea altogether..
> 
> any help or guidance would be greatly appreciated.
> 
> jesse
> -- 
> i am deprogrammed
> 
> 
> --
> To unsubscribe, e-mail: 
> <mailto:tomcat-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 

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


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

Reply via email to