directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: size and cycling of IoThreadPool
Date Wed, 20 Jul 2005 01:16:46 GMT
Hi Alex,

2005/7/20, Alex Burmester <adb@plushpix.com>:
> 
> after running my server for a few days and processing many messages I've
> noticed that in my logs I see Thread names like "IoThreadPool-268"
> First I thought the threadpool had grown crazy large but then a kill -3
> for a thread dump showed only 5 threads of the IoThreadPool type.
> 
> Is it normal for the IoThreadPool to keep incrementing it's thread
> numbers? Do these worker threads have a specific lifespan or does this
> indicate some issue with threads dying?


Yes it is normal. It automatically increases its active threads under high 
load, and decreases its size as the load decreases. There is a property 
called 'keepAliveTime' in thread pool filters. The default value is 60 
seconds. So any idle threads which have been idle for 60 seconds kill 
themselves. You can increase keepAliveTime to Integer.MAX_VALUE to (almost) 
prevent the death of threads, but it is not recommended.
BTW it would be nice if we can reuse the thread number which is appended to 
thread name, wouldn't it?

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Mime
View raw message