Hi,
Repeatable benchmarks showing a significant improvement for some use case
would be appreciated (certainly) and a prerequisite (probably) for addition
into this relatively core part of Tomcat.  I don't think this is much
different than setting the current maxThreads (and min/max Spare threads) as
opposed to acceptCount: one could set maxThreads to 20 and acceptCount to
500, for example.

Yoav Shapira
System Design and Management Fellow
MIT Sloan School of Management / School of Engineering
Cambridge, MA USA
[EMAIL PROTECTED] / [EMAIL PROTECTED]

> -----Original Message-----
> From: Scott Marlow [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 04, 2005 9:42 AM
> To: tomcat-dev@jakarta.apache.org
> Cc: [EMAIL PROTECTED]
> Subject: Tomcat performance patch (in development) to reduce
concurrency...
> 
> Hi,
> 
> I wonder if anyone has any feedback on a performance change that I am
> working on making.
> 
> One benefit of reducing concurrency in a server application is that a
> small number of requests can complete more quickly than if they had to
> compete against a large number of running threads for object locks (Java
> or externally in a database).
> 
> I would like have a Tomcat configuration option to set the max number of
> concurrent threads that can service user requests.  You might configure
> Tomcat to handle 800 http client connections but set the max concurrent
> requests to 20 (perhaps higher if you have more CPUs).  I like to refer
> to the max concurrent requests setting as the throttle size (if there is
> a better term, let me know).
> 
> I modified the Tomcat Thread.run code to use Doug Lea's semaphore
> support but didn't expose a configuration option (haven't learned how to
> do that yet). My basic change is to allow users to specify the max
> number of concurrent servlet requests that can run. If an application
> has a high level of concurrency, end users may get more consistent
> response time with this change. If an application has a low level of
> concurrency, my change doesn't help as their application only has a few
> threads running concurrently anyway.
> 
> This also reduces resource use on other tiers. For example, if you are
> supporting 500 users with a Tomcat instance, you don't need a database
> connection pool size of 500, instead set the throttle size to 20 and
> create a database connection pool size of 20.
> 
> Current status of the change:
> 
> 1. org.apache.tomcat.util.threads.ThreadPool.CONCURRENT_THREADS is
> hardcoded to a value of 18, should be a configurable option.
> 2. I hacked the build scripts to include Doug Lea's concurrent.jar but
> probably didn't make these changes correctly.  I could switch to using
> the Java 1.5 implementation of the Concurrent package but we would still
> need to do something for Java 1.4 compatibility.
> 
> Any suggestions on completing this enhancement are appreciated.
> 
> Please include my [EMAIL PROTECTED] email address in your response.
> 
> Thank you,
> Scott Marlow --- Tomcat newbie


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

Reply via email to