On Tue, 2002-10-29 at 00:10, [EMAIL PROTECTED] wrote:
> Hello,
> 
> I have tomcat 4.1.10 on a red hat Linux server 7.3 with the j2sdk141,
> 
> When I start the tomcat4 service, all is OK and the tomcat server run.
> 
> BUT, when I look the memory usage (with TOP utility), I have this result :
> 
>  11:31am  up 12 days,  2:18,  2 users,  load average: 0,00, 0,00, 0,00
> 90 processes: 87 sleeping, 3 running, 0 zombie, 0 stopped
> CPU states:  0,0% user,  0,5% system,  0,0% nice, 99,4% idle
> Mem:   514340K av,  479748K used,   34592K free,       0K shrd,   75716K
> buff
> Swap: 1048120K av,   35016K used, 1013104K free                  216648K
> cached
> 
>   PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
> 19954 tomcat4   25   0 33584  32M 10464 S     0,0  6,5   0:05 java
> 19957 tomcat4   15   0 33584  32M 10464 S     0,0  6,5   0:00 java
> 19958 tomcat4   15   0 33584  32M 10464 S     0,0  6,5   0:00 java
> 19959 tomcat4   15   0 33584  32M 10464 S     0,0  6,5   0:00 java
> 19960 tomcat4   15   0 33584  32M 10464 S     0,0  6,5   0:00 java
> 19961 tomcat4   15   0 33584  32M 10464 R     0,0  6,5   0:00 java
> 19962 tomcat4   20   0 33584  32M 10464 S     0,0  6,5   0:00 java
> 19963 tomcat4   16   0 33584  32M 10464 S     0,0  6,5   0:00 java
> 19964 tomcat4   16   0 33584  32M 10464 S     0,0  6,5   0:01 java
> 19966 tomcat4   15   0 33584  32M 10464 S     0,0  6,5   0:00 java
> 19967 tomcat4   15   0 33584  32M 10464 S     0,0  6,5   0:00 java
> 19968 tomcat4   15   0 33584  32M 10464 S     0,0  6,5   0:00 java
> 19969 tomcat4   15   0 33584  32M 10464 S     0,0  6,5   0:00 java
> 19970 tomcat4   15   0 33584  32M 10464 S     0,0  6,5   0:00 java
> 19971 tomcat4   15   0 33584  32M 10464 S     0,0  6,5   0:00 java
> 19972 tomcat4   15   0 33584  32M 10464 S     0,0  6,5   0:00 java
> 19973 tomcat4   15   0 33584  32M 10464 S     0,0  6,5   0:00 java
> 
> So,
> 
> My first question is : why tomcat use all the memory while there is no
> users connected (or just one) ?

Ah well, it's Java, that's why. There is a lot of side stuff going on in
a JVM that requires heaps (no pun intended) memory (i.e. you have to pay
for having strong runtime typing, no buffer overflows, run anywhere...).

> My second question is : how much memory is needed if I want to use tomcat
> with many users (500, 1000,...) ?

Huh, depends on what your applications do, really. For so many
concurrent users Tomcat will create separate threads, which means
separate local storage for all of them. Then there is the garbage
collection algorithm, which is usually "lazy", so more then absolutely
necessary will be allocated etc.

> I already read in the forum Tomcat don't manage the memory, it is the
> JVM... so why the jvm use so many processes ?

This is configurable in server.xml, I think. However, if you under
configure it, some clients may be left out.

Bojan


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>

Reply via email to