<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial; font-size: 12pt; color: #000000'>Well, right now based on my testing, if you use the JBoss Threads executor, then you get a performance degradation.&nbsp; It's not big, but its still there.<br><br>If you cannot set maxThreads, then I don't see how we can get the best possible performance on our benchmark efforts.&nbsp; As you increase the injection rate, and run on the large scale hardware we have planned, we will have to be able to set that.<br><br>So, I understand it can be abused, but so can a lot of settings.&nbsp; That's why we have the administration and performance tuning guides (which I will be updating for EAP 6).<br><br>Andy<br><br><hr id="zwchr"><blockquote style="border-left: 2px solid 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: </b>"Jason T. Greene" &lt;jason.greene@redhat.com&gt;<br><b>To: </b>"Brian Stansberry" &lt;brian.stansberry@redhat.com&gt;<br><b>Cc: </b>"Andrig Miller" &lt;anmiller@redhat.com&gt;, jboss-as7-dev@lists.jboss.org<br><b>Sent: </b>Thursday, October 20, 2011 3:27:58 PM<br><b>Subject: </b>Re: [jboss-as7-dev] Controlling Maximum Number of JBoss Web HTTP Threads<br><br>Remy has indicated in the past that he does not want to expose that <br>level of tuning in the default jbossweb pool because of common <br>misuse/misconception about the settings. (IIRC he was against maxthreads <br>for example)<br><br>On 10/20/11 4:16 PM, Brian Stansberry wrote:<br>&gt; I don't know; I'd need the JBoss Web guys to answer that.<br>&gt;<br>&gt; On 10/20/11 4:00 PM, Andrig Miller wrote:<br>&gt;&gt; Do the configuration elements align with the default executor in JBoss<br>&gt;&gt; Web, which is not the JBoss Threads implementation?<br>&gt;&gt;<br>&gt;&gt; Andy<br>&gt;&gt;<br>&gt;&gt; ------------------------------------------------------------------------<br>&gt;&gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp;*From: *"Brian Stansberry"&lt;brian.stansberry@redhat.com&gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp;*To: *jboss-as7-dev@lists.jboss.org<br>&gt;&gt; &nbsp; &nbsp; &nbsp;*Sent: *Thursday, October 20, 2011 1:24:41 PM<br>&gt;&gt; &nbsp; &nbsp; &nbsp;*Subject: *Re: [jboss-as7-dev] Controlling Maximum Number of JBoss<br>&gt;&gt; &nbsp; &nbsp; &nbsp;Web HTTP Threads<br>&gt;&gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp;If the web subsystem config is going to change, I'd like to see if it<br>&gt;&gt; &nbsp; &nbsp; &nbsp;can be made to work the way JCA does[1] -- a config element aligned<br>&gt;&gt; &nbsp; &nbsp; &nbsp;with<br>&gt;&gt; &nbsp; &nbsp; &nbsp;the appropriate pool type in the jboss-as-threads.xsd.<br>&gt;&gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp;[1]<br>&gt;&gt; &nbsp; &nbsp; &nbsp;https://github.com/jbossas/jboss-as/blob/master/build/src/main/resources/docs/schema/jboss-as-jca_1_0.xsd#L120<br>&gt;&gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp;On 10/20/11 2:17 PM, Andrig Miller wrote:<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;Good thing you looked at the code. I assumed that it impacted the<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;threads. I guess the defaults have always been big enough for all the<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;tests I have done then. We should open a JIRA on JBoss Web to add the<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;maxThreads attribute to the XML schema that goes into domain.xml and<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;standalone.xml, and have it defined as read-write, so this can be<br>&gt;&gt; &nbsp; &nbsp; &nbsp;changed.<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;Andy<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp;------------------------------------------------------------------------<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;*From: *"Benjamin Browning"&lt;bbrowning@redhat.com&gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;*To: *"Andrig Miller"&lt;anmiller@redhat.com&gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;*Cc: *"jboss-as7-dev@lists.jboss.org Development"<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;&lt;jboss-as7-dev@lists.jboss.org&gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;*Sent: *Thursday, October 20, 2011 12:02:56 PM<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;*Subject: *Re: Controlling Maximum Number of JBoss Web HTTP Threads<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;The max-connections attribute has no impact on the maximum http<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;threads. If you look at the code, all it does is set the maximum<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;poller size and sendfile size for the underlying JIoEndpoint.<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;To control the threads you either have to use an external executor<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;or set the maxThreads attribute on the protocol handler (which in<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;turn sets it on the underlying JIoEndpoint).<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;Ben<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;On Oct 20, 2011, at 1:47 PM, Andrig Miller wrote:<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;Ben,<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;I think all you have to do is set max-connections="n" to the<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;number of threads you want. That's what I have been doing, and<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;based on looking at the running threads through JConsole, it<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;seems to work just fine. In terms of the executor attribute, and<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;setting up a pool using JBoss Threads, I have done extensive<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;testing. I usually see only a small degradation between the two,<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;like around 1% or so.<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;Of course, that may vary based on what executor you choose to<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;use, but I was using the unbounded queue thread thread pool with<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;good success. I also changed the keepalive time, to keep the<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;threads around for at least an hour, so to avoid churn in my<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;testing between executions.<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;Andy<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp;------------------------------------------------------------------------<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;*From:*"Benjamin Browning"&lt;bbrowning@redhat.com<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;&lt;mailto:bbrowning@redhat.com&gt;&gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;*To:*"Andrig Miller"&lt;anmiller@redhat.com<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;&lt;mailto:anmiller@redhat.com&gt;&gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;*Cc:*"jboss-as7-dev@lists.jboss.org<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;&lt;mailto:jboss-as7-dev@lists.jboss.org&gt;Development"<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;&lt;jboss-as7-dev@lists.jboss.org<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;&lt;mailto:jboss-as7-dev@lists.jboss.org&gt;&gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;*Sent:*Thursday, October 20, 2011 10:32:01 AM<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;*Subject:*Controlling Maximum Number of JBoss Web HTTP Threads<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;I split this thread off from "Two thread pools section in<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;management API" since it's not directly related.<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;In my testing I was never able to create an executor for<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;JBoss Web that didn't have dismal performance. Since<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;TorqueBox needs to be able to easily control the maximum<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;number of http threads we've written a simple service that<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;reads a system property and sets the http connector's<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;protocol handler's maxThreads. This works great and doesn't<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;incur the performance hit of using a separate executor. If<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;there's interest, we could submit a patch upstream to accept<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;a max-threads attribute on the connector definitions.<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;Ben<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;On Oct 20, 2011, at 12:15 PM, Andrig Miller wrote:<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;One thing that I have found with playing around with the<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;various subsystems, is JBoss Web. JBoss Web doesn't<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;expose a thread pool configuration, just a single<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;attribute called max-connections. It also then has an<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;"executor" attribute, which just takes a thread pool<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;name from the JBoss Threads configuration.<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;So, this one is inconsistent with the other subsystems,<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;and I'm not sure if it should be changed to be<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;consistent or not, since the default doesn't use JBoss<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;Threads. This would also complicate any "global" view in<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;the console.<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;Andy<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;_______________________________________________<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;jboss-as7-dev mailing list<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;jboss-as7-dev@lists.jboss.org<br>&gt;&gt; &nbsp; &nbsp; &nbsp; &gt; &nbsp;https://lists.jboss.org/mailman/listinfo/jboss-as7-dev<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; &nbsp; &nbsp; &nbsp;--<br>&gt;&gt; &nbsp; &nbsp; &nbsp;Brian Stansberry<br>&gt;&gt; &nbsp; &nbsp; &nbsp;Principal Software Engineer<br>&gt;&gt; &nbsp; &nbsp; &nbsp;JBoss by Red Hat<br>&gt;&gt; &nbsp; &nbsp; &nbsp;_______________________________________________<br>&gt;&gt; &nbsp; &nbsp; &nbsp;jboss-as7-dev mailing list<br>&gt;&gt; &nbsp; &nbsp; &nbsp;jboss-as7-dev@lists.jboss.org<br>&gt;&gt; &nbsp; &nbsp; &nbsp;https://lists.jboss.org/mailman/listinfo/jboss-as7-dev<br>&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;<br><br><br>-- <br>Jason T. Greene<br>JBoss AS Lead / EAP Platform Architect<br>JBoss, a division of Red Hat<br></blockquote><br></div></body></html>