cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject Re: Possible points of scalibility issues
Date Wed, 13 Feb 2002 20:59:30 GMT
Vadim Gritsenko wrote:
> A little bit on another (but connected) topic...
>>From: Berin Loritsch []
>>I have been performing some performance analysis of the Avalon 
>>Excalibur code, and I discovered
>>some serious points of thread contention.  In a web environment,
>>there can be as many as 150
>>threads (or more) if the web server uses simple thread per 
>>connection technology
>>(most common aproach for Java based servers like Tomcat). 
>>I expanded the Profile tests to work
>>using 100 threads.  The default pooling implementation has 
>>some serious slowdown due to thread contention.
> <snip summary="Avalon enhancements"/>
>>In the interim, I would suggest limiting the number of threads that
> your
>>Servlet container will
>>allow to be used on Cocoon to around 40--but when the core is made
> better, we
>>won't need to have those limitations.
> I see one weak link in this: After you spend lots of time eliminating
> synchronization bottlenecks (which is good!!!), you will get into
> another issue: thread switching is actually done by the operating
> system, and increasing number of threads will result in larger
> performance penalties caused by thread switching in the operating
> system. Next level will be the context switch in the CPU hardware which
> is costly operation.
> Better (IMHO) thing to do is to switch to the asynchronous I/O API and
> to use limited number of worker threads, which should give better
> performance then increasing number of threads. Am I correct here?


However, as of right now, there is no Servlet Container that affords this.

I have tested the new pooled objects with 100 threads, and seen some big
improvements.  Attached is the log dumps from the profile tests.  You can
see the performance increases you can look forward to with just the pools.


"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin

View raw message