tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vicenç <vbelt...@ac.upc.edu>
Subject Re: svn commit: r410234 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java
Date Tue, 30 May 2006 16:41:07 GMT
Remy Maucherat wrote:
> remm@apache.org wrote:
>> Author: remm
>> Date: Tue May 30 02:58:41 2006
>> New Revision: 410234
>>
>> URL: http://svn.apache.org/viewvc?rev=410234&view=rev
>> Log:
>> - Add a brain dead executor.
>> - Submitted by Vincenc Beltran Querol.
>
> I updated my code to use executors exclusively, but it's certain that 
> there's a problem with that, since the server can no longer access the 
> thread usage statistics, and it's then giving up on self tuning. So 
> I'm not sure I'll update to use executors for now.
>
> Rémy
>
Hi Remy,
If you are refering to this snippet of code when you say "self tuning":

        int threadRatio = (endpoint.getCurrentThreadsBusy() * 100)
                / endpoint.getMaxThreads();
        if ((threadRatio > 33) && (threadRatio <= 66)) {
            soTimeout = soTimeout / 2;
        } else if ((threadRatio > 66) && (threadRatio <= 90)) {
            soTimeout = soTimeout / 3;
            keepAliveLeft = 1;
        } else if (threadRatio > 90) {
            soTimeout = soTimeout / 20;
            keepAliveLeft = 1;
        }

maybe we can put this functionality inside the Executor implementation 
(inside beforExecute(...) of ThreadPoolExecutor or assign(...) of 
SimpleThreadPoolExecutor).
We can have access to SocketProcessor socket from the thread pool 
implementation, and also put KeepAliveLeft inside SocketProcessor.

Regards,

- Vicenç




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message