29.01.2013 Views

WebSphere Application Server V7.0: Concepts ... - IBM Redbooks

WebSphere Application Server V7.0: Concepts ... - IBM Redbooks

WebSphere Application Server V7.0: Concepts ... - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Starting a JVM with too little memory means that the application must<br />

immediately switch context to allocate memory resources. This will slow down<br />

the server startup and the execution of the application until it reaches the heap<br />

size it needs to run. Conversely, a JVM that can grow too large does not perform<br />

garbage collection often enough, which can leave the machine littered with<br />

unused objects and a fragmented heap that requires compacting later on.<br />

The levels should be adjusted during the testing phase to ascertain reasonable<br />

levels for both settings. In addition, the prepared statement cache and dynamic<br />

fragment caching also consume portions of the heap. You might be required to<br />

make additional adjustments to the heap when those values are adjusted.<br />

Thread pools<br />

Inside the application server JVM separate thread pools are used to manage<br />

different types of workload. Depending on your type of application, appropriate<br />

thread pools require careful planning.<br />

Web container thread pool<br />

The thread pool for the Web container should be closely monitored during initial<br />

load testing and production. This is the most common bottleneck in an<br />

application environment. Adjust the number of threads in the pool too high, and<br />

the system will spend too much time swapping between threads and requests will<br />

not complete in a timely manner. Adjust the number of threads too low, and the<br />

Web server threads can back up and cause a spike in response at the Web<br />

server tier.<br />

There are no hard rules in this space, because things such as the type and<br />

version of Web server and the percentage of requests that require the application<br />

server can impact the overall optimum tuning level. The best guideline is to tune<br />

this setting in repetitive tests and adjust the numbers.<br />

Enterprise JavaBeans container thread pool<br />

TheEnterprise JavaBeans (EJB) container can be another source of potential<br />

scalability bottlenecks. The inactive pool cleanup interval is a setting that<br />

determines how often unused EJBs are cleaned from memory. Set it too low, and<br />

the application will spend more time instantiating new EJBs when an existing<br />

instance could have been reused. Set it too high, and the application will have a<br />

larger memory heap footprint with unused objects remaining in memory. EJB<br />

container cache settings can also create performance issues if not properly<br />

tuned for the system.<br />

Chapter 7. Performance, scalability, and high availability 239

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!