JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1 Performance Tuning Guide
search filter icon
search icon

Document Information


1.  Overview of GlassFish Server Performance Tuning

2.  Tuning Your Application

3.  Tuning the GlassFish Server

Using the GlassFish Server Performance Tuner

Deployment Settings

Disable Auto-Deployment

Use Pre-compiled JavaServer Pages

Disable Dynamic Application Reloading

Logger Settings

General Settings

Log Levels

Web Container Settings

Session Properties: Session Timeout

Manager Properties: Reap Interval

Disable Dynamic JSP Reloading

EJB Container Settings

Monitoring the EJB Container

Tuning the EJB Container

Overview of EJB Pooling and Caching

Tuning the EJB Pool

EJB Pool Settings

Tuning the EJB Cache

EJB Cache Settings

Pool and Cache Settings for Individual EJB Components

Commit Option

Determining the Best Commit Option

Java Message Service Settings

Transaction Service Settings

Monitoring the Transaction Service

Viewing Monitoring Information

Tuning the Transaction Service

Disable Distributed Transaction Logging

Recover On Restart (Automatic Recovery)

Keypoint Interval

HTTP Service Settings

Monitoring the HTTP Service

DNS Cache Information (dns)


CacheEntries (CurrentCacheEntries / MaxCacheEntries)


Caching DNS Entries

Limit DNS Lookups to Asynchronous





File Cache Information (file-cache)

Keep Alive (keep-alive)

Connection Queue

HTTP Service Access Logging

Network Listener Settings

General Settings

HTTP Settings

Max Connections

DNS Lookup Enabled


Header Buffer Length

File Cache Settings

Max File Count

Max Age

Transport Settings

Thread Pool Settings

Max Thread Pool Size

Min Thread Pool Size

ORB Settings


How a Client Connects to the ORB

Monitoring the ORB

Connection Statistics

Thread Pools

Tuning the ORB

Tunable ORB Parameters

ORB Thread Pool Parameters

Client ORB Properties

Controlling Connections Between Client and Server ORB

Load Balancing

Thread Pool Sizing

Examining IIOP Messages

Resource Settings

JDBC Connection Pool Settings

Monitoring JDBC Connection Pools

Tuning JDBC Connection Pools

Pool Size Settings

Timeout Settings

Isolation Level Settings

Connection Validation Settings

Connector Connection Pool Settings

Transaction Support

Load Balancer Settings

4.  Tuning the Java Runtime System

5.  Tuning the Operating System and Platform


Thread Pool Settings

You can tune thread pool settings by following the instructions in Chapter 5, Administering Thread Pools, in Oracle GlassFish Server 3.1 Administration Guide. If using the Administration Console Thread Pool settings are available on the Configurations->configuration-name->Thread Pools->thread-pool-name page.

The following thread pool settings can have significant effects on GlassFish Server performance:

Max Thread Pool Size

The Max Thread Pool Size parameter specifies the maximum number of simultaneous requests the server can handle. The default value is 5. When the server has reached the limit or request threads, it defers processing new requests until the number of active requests drops below the maximum amount. Increasing this value will reduce HTTP response latency times.

In practice, clients frequently connect to the server and then do not complete their requests. In these cases, the server waits a length of time specified by the Timeout parameter.

Also, some sites do heavyweight transactions that take minutes to complete. Both of these factors add to the maximum simultaneous requests that are required. If your site is processing many requests that take many seconds, you might need to increase the number of maximum simultaneous requests.

Adjust the thread count value based on your load and the length of time for an average request. In general, increase this number if you have idle CPU time and requests that are pending; decrease it if the CPU becomes overloaded. If you have many HTTP 1.0 clients (or HTTP 1.1 clients that disconnect frequently), adjust the timeout value to reduce the time a connection is kept open.

Suitable Request Max Thread Pool Size values range from 100 to 500, depending on the load. If your system has extra CPU cycles, keep incrementally increasing thread count and monitor performance after each incremental increase. When performance saturates (stops improving), then stop increasing thread count.

Min Thread Pool Size

The Min Thread Pool Size property specifies the minimum number of threads the server initiates upon startup. The default value is 2. Min Thread Pool Size represents a hard limit for the maximum number of active threads that can run simultaneously, which can become a bottleneck for performance.

Specifying the same value for minimum and maximum threads allows GlassFish Server to use a slightly more optimized thread pool. This configuration should be considered unless the load on the server varies quite significantly.