On August 9, 2002 03:37 pm, Geoff Talvola wrote:
> On Fri, 2002-08-09 at 17:53, Tavis Rudd wrote:
> > Shouldn't _instanceCacheSize be used?  It seems possible with the current
> > code for the number of instances to get out of control if there was a
> > flood of simultaneous requests.

> It's impossible for an instance cache to grow larger than the maximum
> number of threads simply because of the logic of how requests are
> processed.  Therefore there's no need to use self._instanceCacheSize
> (which I should have removed).

That sounds right, but why tie the cache size to the number of threads.  If 
someone runs WebKit with large number of threads, say a hundred, it's 
possible for this scheme to consume lots of memory during a flood.  Wouldn't 
be better to either a) maintain a count of the instances and go into a wait 
loop if a request comes in while the cache is empty but enough instances have 
been created, or b) put a cap on the size of the cache that is obeyed when 
returning instances to it? 

> At least, that's the theory.  It's probably worth running a test with an
> artifically low number of maximum threads (like 2) and then hammer the
> server with tons of simultaneous requests.  I'm pretty confident that
> the instance caches would never grow above 2 items.  You can view the
> size of the caches in the Admin pages.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to