On 13.11.12 15:02, Stephen Deasey wrote:
> On Tue, Nov 13, 2012 at 11:18 AM, Gustaf Neumann <neum...@wu.ac.at> wrote:
>> minthreads = 2
>>
>> creating threads, when idle == 0
>>     10468 requests, connthreads 267
>>     total cputime 00:10:32
>>
>> creating threads, when queue >= 5
>>     requests 10104 connthreads 27
>>     total cputime 00:06:14
> What if you set minthreads == maxthreads?
The number of thread create operations will go further down. 
When running already at minthreads, the connection thread 
timeout is ignored (otherwise there would be a high number 
of thread create operations just after the timeout expires 
to ensure minthreads running connection threads). With 
connsperthread == 1000, there will be about 10 thread create 
operations for 10000 requests (not counting the 2 initial 
create operation during startup for minthreads == 2). So, 
the cpu consumption will be lower, but the server would not 
scale, when the requests frequency would require more 
connection threads. Furthermore, there will be most likely 
more requests put into the queue instead of being served 
immediately.

When we assume, that with minthreads == maxthreads == 2 
there won't be more than say 20 requests queued, a similar 
effect could be achieved by allowing additional thread 
creations for more than 20 requests in the queue. Or even 
more conservative, allowing thread creations only when the 
request queue is completely full (setting the low water mark 
to 100%) would as well be better than minthreads == 
maxthreads, since the server will at least start to create 
additional threads in this rather hopeless situation, where 
with minthreads == maxthreads, it won't.





------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to