64 e-Marketplace Pattern using WebSphere Commerce Suite, Marketplace Edition
5.4.9 Web server stay alive
These directives deal with the persistent connection feature of the HTTP V1.1
specification. With HTTP V1.0, each HTTP session establishes a new TCP
connection. If your home page has a lot of images, you will need to establish
TCP connections many times to send all data for one page. The persistent
connection feature is designed to avoid this behavior. After one session is
finished, the connection still remains and the next request can re-use the
connection. If IHS gets an HTTP/1.1 request, IHS can re-use the connection
until it receives the connection close request. The directives to understand
KeepAlive - Whether or not to allow persistent connections (more than one
request per connection). Set to "off" to deactivate. The default is on.
KeepAliveTimeout - Number of seconds to wait for the next request. The
default value is 15. To avoid waiting too long for the next request, you can
specify the number of seconds to wait. Once the request has been
received, the Timeout directive will apply.
MaxKeepAliveRequests - The maximum number of requests to allow
during a persistent connection. Set to 0 to allow an unlimited number.
Timeout - Sets the number of seconds the IHS waits for these three
- Time taken to receive a GET request.
- Time taken between receipt of TCP packets on a POST or PUT
- Time taken between acknowledgments on transmissions of TCP
packets in responses. The default value is 300.
5.5 Application server
For an application server in WebSphere V3 there are a number of settings
that have an impact on performance. In addition to the settings for the
application server itself there are also a number of settings for the various
components of an application server; servlet engine, Web application, and
the EJB container, that can affect performance. The following parameters are
set using the WebSphere Application Server Administrative Console:
Java Virtual Machine (JVM)
These parameters will be discussed in detail in the following sections.
Chapter 5. Performance guidelines 65
5.5.1 Selecting a JVM
High-performance JVMs are critical for good performance. Here are some
considerations when evaluating JVMs:
1. Java compiler and virtual machine technology changes rapidly. Today a
JIT version of a compiler may provide the best performance for your
solution; Tomorrow it may be a static compiler, and next week there may
be a new technique.
2. A JVM should be certified for portability by a recognized certification
authority such as JavaSoft.
3. JVMs that have been optimized for a specific operating system tend to
perform better than other JVMs.
4. Systems with symmetric multiprocessors (SMP) tend to perform better
because of the thread support in Java. Use JVMs that effectively support
SMP systems.
5. Evaluate the trade-off between the stability of the current release of a JVM
and the performance enhancements available in the newest beta release
and/or production version.
Generally speaking, the selection of a JVM should be of little concern to you.
The performance of applications can often be better improved by improving
the runtime characteristics of the algorithms used. However, there are
circumstances, such as computationally intensive programs, where an
improvement in the performance of the underlying JVM will add to the
solution’s overall performance.
5.5.2 Threads
Each application server has its own thread pool from which it uses threads to
process remote method invocations. This pool size varies throughout the
servers lifetime. Threads are created when needed and destroyed when there
are too many idle threads. Each application server has a setting for thread
pool size. Consider increasing the thread pool size if analysis shows that the
maximum number of threads in the pool are frequently in use.
5.5.3 Caching
The addition of memory to a system almost always improves performance.
This is because physical I/O is a relatively expensive operation in terms of
latency. It makes intuitive sense that by, dedicating memory in a Web server
to store frequently accessed HTML pages and images, you will improve
performance. As a rule of thumb, your Web server should have enough RAM
to accommodate all network buffers, frequently used applications, images

Get e-Marketplace Pattern using WebSphere Commerce Suite, MarketPlace Edition Patterns for e-business Series now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.