jboss7增加线程数

来源:互联网 发布:不用网络的手机电视 编辑:程序博客网 时间:2024/05/19 22:55

最近在做的需求,使用jboss7部署的,在压测的时候发现吞吐量总是上不去,找了好久发现是jboss7默认的线程数有些少

1、如下图,默认的jboss7的standalone.xml里的线程模块是空的。


默认的线程大约60左右吧(这个没有仔细测)

2、修成核心线程500,最大线程600, executor的最大连接数600,效果很明显哦



为了方便复制,贴出增加部分

     1、   <subsystem xmlns="urn:jboss:domain:threads:1.1">
            <bounded-queue-thread-pool name="http-executor">
                <core-threads count="500"/>
                <queue-length count="50"/>
                <max-threads count="600"/>
                <keepalive-time time="3" unit="seconds"/>
            </bounded-queue-thread-pool>
        </subsystem>


      2、      <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" max-post-size="2048" executor="http-executor" max-connections="600"/>