> From: Oleg [mailto:[EMAIL PROTECTED] 
> I am trying to approximate the amount of memory my server 
> will need running 
> tomcat. I understand that a lot depends on how the appication handles 
> resources, however at this point I am trying to figure out 
> what will be the 
> mimimum needed. In my case I have virtual hosting setup, with 
> all hosts 
> sharing the same libraries, so I have struts, hibernate,... 
> all sitting in 
> shared/lib directory of Tomcat. Would I be correct to 
> estimate that Tomcat 
> will atleast need
> 
> n(number of users/applications) * mb(total size of shared/lib)

As Chuck has already pointed out, no (but I'm going to try a slightly
different angle on it :-) ).  Each class that is loaded from shared/lib
will be loaded by the Shared classloader, so you'll only have one copy
of the class in your JVM.  Jars are compressed, so the sizes of the
loaded classes will be larger than the bytes occupied on disk; but not
all of the classes from a jar will be loaded, so the sizes will probably
be smaller.  Note, however, that any classes in the webapp's WEB-INF/lib
*will* be loaded once per webapp.  If you have large numbers of
applications, you may want to put more common libraries in shared/lib,
and you may also wish to increase the size of the permanent generation
(PermGen) in the JVM's memory model as this is where the classes are
stored.

Your per-session and per-page data will dwarf the space required for
classes; and, as Chuck pointed out, the only way to find out these sizes
is to profile the app.  This will also make sure that you're not going
to fall foul of any other performance limits, such as CPU use or disk
bandwidth.

                - Peter

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

Reply via email to