Sie sind auf Seite 1von 3

JBoss Performance Tuning

Server Version

Planning to achieve Tune JBoss Thread Pools

Configuration in conf/jboss-service.xml When running an application which issues lots of requests (such as EJB invocations) monitor your thread pool. Web Console > MBean jboss.system:service=ThreadPool. if QueueSize>= MaximumPoolSize set a higher MaximumPoolSize server.xml and deployed in the root of JBoss web container (JBoss 4.2.0 : "JBOSS_HOME\server\default\deploy\jbossweb.deployer") important parameters: maxThreads - This indicates the maximum number of threads to be allocated for handling client HTTP requests. This figure corresponds to the concurrent users that are going to access the application. Depending on the machine configuration, there is a physical limit beyond which you will need to do clustering. acceptCount - This is the number of request threads that are put in request queue when all available threads are used. When this exceeds, client machines get a request timeout response. compression - If you set this attribute to force , the content will be compressed by JBoss and will be send to browser. Browser will extract it and display the page on screen. Enabling compression can substantially reduce bandwidth requirements of your application. web console > MBean jboss.web:name=http-127.0.0.18080,type=ThreadPool. The key attribute : currentThreadsBusy. If it's about 70-80% of the maxThreads, consider raising the number of maxThreads. deploy/jboss-web.deployer/conf/ web.xml
<init-param> <param-name>development</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>checkInterval</param-name> <param-value>300</param-value> </init-param>

Fine tuning the Underlying HTTP connector of JBoss for production settings

Turn off JSP Compilation in production. ( In a production server, JSP files won t change)

5.x/4.2

switch from the standard jrmp service invoker to the pool invoker

In standardjboss.xml (5.x):
<invokermbean>jboss:service=invoker,type=jrmp</invokermbean>

4.x

Find 4 occurrences of it:


stateless-rmi-invoker, clustered-stateless-rmiinvoker, stateful-rmi-invoker,entity-rmi-invoker.

replace this fragment with :


<invokermbean>jboss:service=invoker,type=pooled</invokermbean>

optimize
min-pool-size

and
max-pool-size

Disable Console logging Prevent Immediate Flushing

Disable Console logging in production and use only the File appender for better logging performance. Tune the File Appender by setting the ImmediateFlush attribute to false:
<param name="ImmediateFlush" value="false" />

Change the logging layout to use the log4j date formatters

By default, the File appender performs a flush operation after writing each event, ensuring that the message is immediately written to disk. Setting the ImmediateFlush option to false can drastically reduce I/O activity since the Output-StreamWriter will buffer logs in memory before writing them to disk. These can be specified using one of these strings: ABSOLUTE,
DATE.

For example:
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c] %m%n"/>

circumvent ancestor loggers

(~10% boost!!) All the logging events captured by the child logger com.sample will be processed by the child logger itself and also by its parent logger com. In log4j, by setting the additivity of the logger to false, you can circumvent ancestor loggers, thus improving the performance significantly. This can be done by configuring the attribute additivity on the logger:
<logger name="com.sample" additivity="false" > <level value="INFO" /> <appender-ref ref="CONSOLE"/> <appender-ref ref="FILE"/> </logger>

Or programmatically with the method: logger.setAdditivity(false);

http://www.jaysonjc.com/programming/how-to-configure-jboss-as-production-settings-and-tuningtips.html http://community.jboss.org/wiki/JBossASTuningSlimming http://community.jboss.org/wiki/JBoss5xTuningSlimming http://www.mastertheboss.com/jboss-application-server/113-jboss-performance-tuning-1.html http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html http://books.google.com/books?id=DpHvFpK2omsC

Das könnte Ihnen auch gefallen