Tomcat 4.1.12 and Linux Threads

Tomcat 4.1.12 and Linux Threads

Post by geol » Wed, 26 Feb 2003 05:11:30



We are running Tomcat 4.1.12 on RH 7.2 machines with
the blackdown 1.3.1 JDK.  We are currently running the
JVM with the -green option to force green threads (ie - a
single thread).  

Looking at some past posts to this forum and also at
"Professional Apache Tomcat" by Chopra, Galbraith,Li etal
the options minProcessors, maxProcessors,  maxThreads,
maxSpareThreads, and minSpareThreads seem like they should
control the number of java threads tomcat runs with.  

Trouble is, I can adjust these all day (until the cows come
home) and I always have 20 java processes/threads.

This is with a single <host> with a single <connector>.  
Adding another <host> adds 5 more processes/threads.  

Is there anyway to reliably control the number of threads
tomcat starts?  

With Tomcat running with 1 <host> and a single ajp13 <connector>,
tomcat starts 30 processes which are using 443 MB of ram
(22376KB - 7844KB = 14532KB each process.  30 x 14532 + 7844 = 443804 MB)

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
17429 webserve  35  10 22376  21M  7844 S N   0.0  1.4   0:02 java
17460 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17461 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17462 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17463 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17464 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17465 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17466 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17467 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17468 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17469 webserve  26  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17470 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17471 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17472 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17473 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17474 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17475 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17476 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17477 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17478 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17479 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17480 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17481 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17482 webserve  26  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17483 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17490 webserve  26  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17491 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17492 webserve  26  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17496 webserve  26  10 22376  21M  7844 S N   0.0  1.4   0:00 java
17497 webserve  26  10 22376  21M  7844 S N   0.0  1.4   0:00 java

We don't mind the multiple processes, but 30 for a single host???
TIA

 
 
 

Tomcat 4.1.12 and Linux Threads

Post by John Murtar » Mon, 03 Mar 2003 09:44:04



> We are running Tomcat 4.1.12 on RH 7.2 machines with
> the blackdown 1.3.1 JDK.  We are currently running the
> JVM with the -green option to force green threads (ie - a
> single thread).  

> Looking at some past posts to this forum and also at
> "Professional Apache Tomcat" by Chopra, Galbraith,Li etal
> the options minProcessors, maxProcessors,  maxThreads,
> maxSpareThreads, and minSpareThreads seem like they should
> control the number of java threads tomcat runs with.  

> Trouble is, I can adjust these all day (until the cows come
> home) and I always have 20 java processes/threads.

> This is with a single <host> with a single <connector>.  
> Adding another <host> adds 5 more processes/threads.  

> Is there anyway to reliably control the number of threads
> tomcat starts?  

> With Tomcat running with 1 <host> and a single ajp13 <connector>,
> tomcat starts 30 processes which are using 443 MB of ram
> (22376KB - 7844KB = 14532KB each process.  30 x 14532 + 7844 = 443804 MB)

>   PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
> 17429 webserve  35  10 22376  21M  7844 S N   0.0  1.4   0:02 java
> 17460 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17461 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17462 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17463 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17464 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17465 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17466 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17467 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17468 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17469 webserve  26  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17470 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17471 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17472 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17473 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17474 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17475 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17476 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17477 webserve  25  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17478 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17479 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17480 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17481 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17482 webserve  26  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17483 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17490 webserve  26  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17491 webserve  30  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17492 webserve  26  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17496 webserve  26  10 22376  21M  7844 S N   0.0  1.4   0:00 java
> 17497 webserve  26  10 22376  21M  7844 S N   0.0  1.4   0:00 java

> We don't mind the multiple processes, but 30 for a single host???
> TIA

        I have seen the same thing.  DOes anyone have
any tips on this?
        Many thanks!

--
                                          John
___________________________________________________________________
John Murtari                              Software Workshop Inc.

http://www.thebook.com/

 
 
 

1. mod_jk2 apache2 tomcat 4.1.12?

Hi guys!

I want to get tomcat 4.1.12 going together with apache for static content
(on FreeBSD 4.7), and I just realized that tomcat 4.1.12 doesn't care about
the REMOTE_USER that mod_jk sends. This is with apache1.3.2x, mod_jk from
port and tomcat-4.1.12.

So, instead of debugging tomcat, I thought I'd try mod_jk2 & apache2... got
it compiled after some tweaking, and am about to configure, but thought I'd
check first to see if someone actually has this combo running, and whether
it is stable enough yet?

Cheers,
Palle


with "unsubscribe freebsd-java" in the body of the message

2. Why won't this work?

3. Threads in linux versus threads in NT and threads in Solaris.

4. Problem with Home Network setup

5. Imake.tmpl

6. Apache 1.3.12 and Tomcat 4.0

7. diald on multia

8. IBM HTTP Server 1.3.12 AIX + Tomcat

9. Apache 1.3.12, JServ, Tomcat servlet execution

10. bus error on jdk1.3.1p5 native threads / tomcat 3.2.3

11. Matrox Mystique ands X.

12. Tomcat 3.2.3 under jdk1.3.1p6-native threads