from the book effective enterprise java
anonymous wrote : In order to maintain a system that?s as scalable as possible, 
the container seeks to take on resource management as part of its duties. It 
does this because, as a unifying force across all sorts of different programs 
and enterprise systems, the container often has a better picture of what the 
overall resource needs are, as opposed to your code?s rather localized view of 
the world.
  | But now you start firing up threads from your servlets. Because the servlet 
specification provides no way for a servlet developer to integrate with the 
servlet container?s thread-management scheme, these threads are, by definition, 
outside the servlet container?s control. So if the system administrator sets a 
thread pool limit of N threads in the servlet container because he?s figured 
out, after much tuning and testing, that N is the optimal number for this 
particular container and platform, the underlying virtual machine is actually 
running N + 1 threads-the N threads the servlet container knows about, and the 
1 that it doesn?t, your servlet?s thread. Suddenly, you?re past the point of 
optimal usage, and starting down the road of diminishing returns. If that ?1? 
becomes ?2? or more, this could very quickly get into a situation where the 
thread-switching time outnumbers the actual work time

Now this quote relates to servlets specifically, but the main idea is the same. 
If I configure the container to work with N threads, and I start adding threads 
manually - the optimization I conducted is now lost...

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3862379#3862379

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3862379


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to