Howdy,

The leak is more precisely bloat, i.e., Tcl interps that create more and more 
objects and various per-thread thingers that grow in size and hang around, 
e.g., ADP caches and output buffers.  These resources are somewhat reclaimed 
when a thread exists.   But, assuming the normal "zippy" memory allocator is in 
use, the various small blocks of memory used by the allocator in the dying 
thread are flushed to a "shared" pool for other threads.  The memory is not 
actually "returned" via a munmap, e.g..  Nate Folkman and I spent tons of time 
trying to figure this out years ago with all sorts of coalescing, unmapping, 
etc. fun but failed.  It's possible other memory allocators have the same or 
better performance in speed and space today.

So, while it's very smart to have maxconns > 0 (and 100 to 1000 seems good), 
you will often still see continued bloat of the server size as reported by, 
e.g., top.


Anyway, what's the race condition?  Curious about that one.

-Jim



On Jul 27, 2012, at 9:08 PM, Jeff Rogers <dv...@diphi.com> wrote:

> Bjoern Kiesbye wrote:
>> Hi Thorpe, I think Aolserver 4.5.0 ignores this settings  from
>> config.tcl, and if not set explicitly using ns_pools set command,
>> Aolserver will use deafult values. I would suggest to in crease the
>> maxconns value to at least 100, it does not cost extra pre occupied
>> resources, it just indicates how many client connections (per thread)
>> can wait for a thread to become available again, before the Aolserver
>> refuses to establish new client connections. This includes all
> 
> Not quite - maxconns is the number of requests a thread will be allowed 
> to serve before it exits and a new one is spawned.  Reusing an existing 
> thread is vastly more efficient than spawning a new one, but sometimes 
> resources can leak if a thread sticks around too long.  If there's not 
> an available thread to handle a request, it gets queued.
> 
> Another reason to set maxconns higher is that if it is set too low, the 
> server can crash under load due to a race condition.  I agree with 100 
> as a minimum; 1000 is quite reasonable.
> 
> -J
> 
>> requests including images, css/js files etc. not just requests for
>> tcl/adp pages.If for example you have a Page showing 20 Images from
>> fotoalbum, once the html is loaded and the browser starts requesting
>> the page elements (20 images + 4 css/js files == 24 elements),  with
>> your current setting maxthreads 10  and maxconns 1  ( 10 * 1  == 10
>> globalmaxconns) , this will lead to  14 browser requests to be
>> rejected by Aolserver (assuming the Browser makes all requests at
>> exactly the same time).The product of maxthread and maxconns must be
>> greater then the sum of all simultaneous client connections, other
>> wise some client requests will be rejected by Aolserver. Increasing
>> the maxthreads setting can help too but each thread requires extra
>> Memory (for a OpenAcs core only install each thread requires about 40
>> MB).
>> 
>> Bjoern
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> aolserver-talk mailing list
> aolserver-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/aolserver-talk


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk

Reply via email to