大多数应用程序。在进行调优时,服务器提供了一种调整WebContainer工作线程数量的方法。在JBoss AS 7.x中有可能做到这一点吗?
谢谢。
发布于 2013-07-11 07:08:24
您可以调优AS7 web子系统的HTTP Conector。您可以为HTTP Connector调优的可用属性在The Http Connector中进行了描述。要定义此连接器的最大连接数,需要在$JBOSS_HOME/standalone/configuration/standalone.xml或$JBOSS_HOME/domain/configuration/domain.xml中进行更改
请看这段配置:
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
<connector name="http"
protocol="HTTP/1.1"
scheme="http"
socket-binding="http"
max-connections="250"/>
...
</subsystem>要定义一个特定于HTTP Connector的线程池,您需要使用如下所示的AS7线程子系统:
<subsystem xmlns="urn:jboss:domain:threads:1.0">
<bounded-queue-thread-pool name="http-executor" blocking="true">
<core-threads count="10" per-cpu="20" />
<queue-length count="10" per-cpu="20" />
<max-threads count="10" per-cpu="20" />
<keepalive-time time="10" unit="seconds" />
</bounded-queue-thread-pool>
</subsystem>然后,您需要在HTTP连接器的executor属性中引用它。请看下面这段配置:
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
<connector name="http"
protocol="HTTP/1.1"
scheme="http"
socket-binding="http"
max-connections="250"
executor="http-executor"/>
...
</subsystem>有关调优AS7的更多详细信息,请参阅masterjboss.com上的这篇文章JBoss AS 7 Performance tuning - Tuning Web server thread pool。
https://stackoverflow.com/questions/17574285
复制相似问题