<html><head><base href="x-msg://184/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The max-connections attribute has no impact on the maximum http threads. If you look at the code, all it does is set the maximum poller size and sendfile size for the underlying JIoEndpoint.<div><br></div><div>To control the threads you either have to use an external executor or set the maxThreads attribute on the protocol handler (which in turn sets it on the underlying JIoEndpoint).</div><div><br></div><div>Ben</div><div><br><div><div><div>On Oct 20, 2011, at 1:47 PM, Andrig Miller wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><div style="font-family: Arial; font-size: 12pt; color: rgb(0, 0, 0); ">Ben,<br><br> I think all you have to do is set max-connections="n" to the number of threads you want. That's what I have been doing, and based on looking at the running threads through JConsole, it seems to work just fine. In terms of the executor attribute, and setting up a pool using JBoss Threads, I have done extensive testing. I usually see only a small degradation between the two, like around 1% or so.<br><br>Of course, that may vary based on what executor you choose to use, but I was using the unbounded queue thread thread pool with good success. I also changed the keepalive time, to keep the threads around for at least an hour, so to avoid churn in my testing between executions.<br><br>Andy<br><br><hr id="zwchr"><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt; "><b>From:<span class="Apple-converted-space"> </span></b>"Benjamin Browning" <<a href="mailto:bbrowning@redhat.com">bbrowning@redhat.com</a>><br><b>To:<span class="Apple-converted-space"> </span></b>"Andrig Miller" <<a href="mailto:anmiller@redhat.com">anmiller@redhat.com</a>><br><b>Cc:<span class="Apple-converted-space"> </span></b>"<a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><span class="Apple-converted-space"> </span>Development" <<a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a>><br><b>Sent:<span class="Apple-converted-space"> </span></b>Thursday, October 20, 2011 10:32:01 AM<br><b>Subject:<span class="Apple-converted-space"> </span></b>Controlling Maximum Number of JBoss Web HTTP Threads<br><br>I split this thread off from "Two thread pools section in management API" since it's not directly related.<div><br></div><div>In my testing I was never able to create an executor for JBoss Web that didn't have dismal performance. Since TorqueBox needs to be able to easily control the maximum number of http threads we've written a simple service that reads a system property and sets the http connector's protocol handler's maxThreads. This works great and doesn't incur the performance hit of using a separate executor. If there's interest, we could submit a patch upstream to accept a max-threads attribute on the connector definitions.<div><br></div><div>Ben</div><div><br><div><div>On Oct 20, 2011, at 12:15 PM, Andrig Miller wrote:</div><br class="Apple-interchange-newline"><blockquote><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><div><div style="font-family: Arial; font-size: 12pt; color: rgb(0, 0, 0); ">One thing that I have found with playing around with the various subsystems, is JBoss Web. JBoss Web doesn't expose a thread pool configuration, just a single attribute called max-connections. It also then has an "executor" attribute, which just takes a thread pool name from the JBoss Threads configuration.<br><br>So, this one is inconsistent with the other subsystems, and I'm not sure if it should be changed to be consistent or not, since the default doesn't use JBoss Threads. This would also complicate any "global" view in the console.<br><br>Andy<br></div></div></span></blockquote></div><br></div></div></blockquote><br></div></div></span><br class="Apple-interchange-newline"></blockquote></div><br></div></div></body></html>