Endre Stølsvik typed the following on 09:23 PM 12/23/2000 +0100
>| > I'm trying desperately to get tomcat to use only ONE thread. But I always
>| > seem to end up with 10 or so..
>
>Yes, this is only for development purposes. I have a bunch of separate
>server setups on one box, one for each developer (because of the not
>working at all reload issue on tomcat 3.2).
> Only one guy is using each tomcat, so the whole point is that I don't
>want a bunch of threads doing nothing.
Why not?
It seems to me you're spending a lot of effort chasing a red herring.
Are you worried about the performance impact of unnecessary threads?
What makes you think reducing it down to a single thread would make
a noticeable difference on your box? I'm skeptical that it would.
In my experience, the biggest resource drain of running multiple JVMs
and multiple instances of Tomcat is memory - memory usage probably
has at least 100-1000 times more of an impact on the performance of your
box than the number of threads. Get your developers to focus on keeping
memory usage down and you'll get a much bigger reward for your efforts
than worrying about the threaded architecture of Tomcat.
If threads are really keeping you awake at night, the best you can do
is cut down on the connector threads:
<Connector className="org.apache.tomcat.service.PoolTcpConnector">
<Parameter name="handler"
value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
<Parameter name="port" value="8080"/>
<Parameter name="max_threads" value="2"/>
<Parameter name="max_spare_threads" value="2"/>
<Parameter name="min_spare_threads" value="1" />
</Connector>
There are still going to be other threads - Tomcat is a threaded application.
There's not much you can do about it.
Kief
---
Kief Morris
Director of Technology
bitBull Ltd. http://www.bitBull.com
phone +44 020 7598 9938
fax +44 020 7460 4081