Geoffrey Talvola wrote:
Tripp Lilley wrote:
It's actually easier to implement this than it sounds... When a
request comes in for a pool object, the pool looks for an existing
instance. If there are no existing instances, it doesn't
-immediately- create one. Rather, it waits a specified time for an
existing instance to become available, and, if not, -then- creates a
new one. This puts an upper bound on the time a client will have to
wait for a handler. This timeout is pretty easy to implement using a
lock.wait(timeout) call on a lock that represents instance
availability in the pool's internal queue. 

Discarding extra pool instances is left as an exercise to the reader

I'm not conviced that a dynamic algorithm is better than just using a fixed
pool (assuming we're talking about threads, or servlet instances).  Your box
has to have enough memory and horsepower to handle the worse case of a
maxed-out pool, right?  If that's the case, then why not just allocate the
maximum right up front (or let the pools grow as needed like the servlet
pools)?  Surely having some extra threads or extra instances lying around
doesn't noticeably hurt performance.  Also, having to allocate extra
instances or threads to handle a surge of activity is bound to be somewhat
costly just at the time when you need the CPU to actually _handle_ the

When I deploy WebKit I set the minimum, maximum, and initial thread pool
sizes to the same value.  Can someone convince me why this is a bad idea?

- Geoff

This is how Netware (4.xx) used to work. Any process could cause the OS the spawn threads as needed and it was assumed that if you hit a peak load once you would hit it again - so leave the threads running.  And if some less ethical resellers used the max threads as a reason to buy a bigger server for the customer at least they never mentioned the vendor hardware engineer pointed that out.  It was really tought to sell new netware servers back in the day since they always worked and customers never really needed to upgrade... One guy wanted to stick with Netware 3 even after 5 came out - but I digress....

I agree w/ letting the pool stay at its max value, but that should be documented if the change is made.  There have already been a number of posts about Webware running 24 threads when no-one is using it.


This email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here:
Cheetahtemplate-discuss mailing list

"I don't know what's wrong with my television set. I was getting
 C-Span and the Home Shopping Network on the same station.
 I actually bought a congressman."
    - Bruce Baum