rss· 投稿· 设为首页· 加入收藏· 繁體版
当前位置: 火魔网 » 程序开发 » JavaEE

Jboss数据库连接池性能调整比较有用的几个参数

min-pool-size: This element specifies the minimum number of connections a pool should hold. These pool instances are not created until an initial request for a connection is made. This default to 0.

max-pool-size: This element specifies the maximum number of connections for a pool. No more than themaxpool-size number of connections will be created in a pool. This defaults to 20.

blocking-timeout-millis: This element specifies the maximum time in milliseconds to block while waiting for a connection before throwing an exception. Note that this blocks only while waiting for a permit for a connection, and will never throw an exception if creating a new connection takes an inordinately long time. The default is 5000.

idle-timeout-minutes: This element specifies the maximum time in minutes a connection may be idle before being closed. The actual maximum time depends also on the IdleRemover scan time, which is 1/2 the smallest idle-timeout-minutes of any pool.

track-statements: This boolean element specifies whether to check for unclosed statements when a connection is returned to the pool. If true, a warning message is issued for each unclosed statement. If the log4j categoryorg.jboss.resource.adapter.jdbc.WrappedConnection has trace level enabled, a stack trace of the connection close call is logged as well. This is a debug feature that can be turned off in production.

prepared-statement-cache-size: This element specifies the number of prepared statements per connection in an LRU cache, which is keyed by the SQL query. Setting this to zero disables the cache.

Jboss web container 性能调整比较有用的参数

Tomcat 的Server.xml <Connector></Connector>的属性

maxThreads="1000"

minSpareThreads="25"

maxSpareThreads="50"

acceptCount="100"

connectionTimeout="20000"

disableUploadTimeout="true"

maxKeepAliveRequests="1000"

tcpNoDelay="true"

URIEncoding="GBK"

conf下的jboss-service.xml文件

An mbean'attribute for hot deployment/undeployment of archives

<attribute name="ScanPeriod">5000</attribute>

<attribute name="ScanEnabled">false</attribute>

顶一下
(0)
踩一下
(0)