--- QM <[EMAIL PROTECTED]> wrote:
> On Mon, Aug 30, 2004 at 08:37:24PM -0700, Sagara
> Wijetunga wrote:
> : Since the servlet resides in the RAM once it is
> : loaded, the memory consumption and possible abuse
> is
> : my concern.
>
> There's much more to memory in a Java webapp than
> just the servlets.
> Read on:
>
>
> : 1. Is it possible to run multiple Tomcat instances
> on
> : the same machine?
>
> Yes. Please refer to the Tomcat docs on how to do
> this.
>
>
> : 2. How much RAM (in roughly) is required for a
> single
> : or additional Tomcat instance without any servlet
> : loaded? Assume we use latest SUN Javasoft JVM and
> : latest Tomcat.
>
> Try not to think of individual servlets; think of
> the webapp as a whole.
> You must load-test and profile your app to see how
> much memory it will
> use in a peak situation because no two webapps are
> the same. (i.e.
> there's no way someone who's never seen your app can
> give reliable
> numbers. It's all up to you.)
>
I'm not thinking at servlet level, not even at web-app
level. I'm thinking at Tomcat instance (Tomcat sever)
level. I understand each Tomcat instance can have
multiple web-apps and each web-app can have multiple
servlets? Am I wrong?
I'm not worried about the transient memory used by the
Tomcat instance for it to serve servlets.
But I'm worried about the memory permanently allocated
for a Tomcat instance. Eg. A servlet in a particular
Tomcat instance, may load the entire database into the
memory for efficiency reasons. Now this Tomcat
instance requires X amount of memory to keep the
database and all the stuff related to that Tomcat
instance (except transient memory) to keep them in
memory. And it requires additional variable amount of
transient memory to serve it, that depends on the
demand for that Tomcat instance.
What I need to know is can I restrict the size of X?
If the memory allocated permanently to a particular
Tomcat instance cannot be restricted, Can I restrict
the total memory allocation (ie. permanent + transient
memory) for that Tomcat instance?
> : 3. Once the RAM limit is specified to a particular
> : Tomcat instance, what happens if they exceed the
> : limit? Does it still continue to allocate RAM or
> does
> : it give a run-time error?
>
> This has more to do with the JVM than with Tomcat.
> (Tomcat runs within
> the JVM.) You'd do well to read up on the
> specifics, but usually the
> JVM will throw an OutOfMemoryException, in which
> case it's up to you to
> repeat step 2 and profile/size.
>
Does this OutOfMemoryException means it ran out of
physical memory or there are still lot more physical
memory available but the limit specified to the Tomcat
instance exceeded?
Kind regards
Sagara
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]