You can significantly improve the performance of GlassFish Server and the applications deployed on it by adjusting a few deployment and server configuration settings. These changes can be made manually or by using the built-in GlassFish Server Performance Tuner.
The Performance Tuner recommends server settings to suit the needs of your GlassFish Server deployment. It helps you reach an optimal configuration. Finer tuning might be needed in case of specific requirements. The Tuner performs static analysis of GlassFish Server resources and throughput requirements. No dynamic inspection of the system is performed.
You can configure performance tuning for the entire domain, or for individual GlassFish Server instances or clusters.
Using the Performance Tuner is a two-step process:
Verify or modify information about your GlassFish Server environment.
Review the recommendations made by the Performance Tuner and apply or cancel the changes.
Ensure that the domain, server instance, or cluster for which you want to perform performance tuning is running.
The Server Performance Tuner (Step 1 of 2) page opens.
If necessary, consult your system administrator.
The available configurations will vary depending on the server instances or clusters that are currently defined in the domain.
The default is 1.
You do not need to specify the total number of CPUs on the machine, only the number you want to allocate for use by each Enterprise Server instance running on it.
On an Oracle SPARC Enterprise T-Series, the number of logical CPUs (or processor threads) is returned by a command such as psrinfo. An Oracle SPARCT3-4 Server can have up to 512 processor threads. For more information, consult your hardware vendor's data sheet.
Specify the size of the heap memory for the GlassFish Server's JVM server instance. The default is 1024 MB. The specified value for heap memory may not be applied if the tuner determines that it is not optimal.
Specify that the allocation time is Low (0% - 10%), Medium (10% - 20%), or High (>= 20%). The default is Medium.
This is the time in the database tier spent by the primary application deployed on the instance or cluster being tuned. If you have multiple applications deployed on the cluster, this should be the sum of the time spent in the database tier by all applications. You should also take into account the time spent per web or EJB request.
Specify either Maximum Peak Throughput (Higher GC Pause) or Low GC Pause (Lower Peak Throughput). The default is Maximum Peak Throughput.
This strategy determines what happens to garbage collection in the JVM. Obviously garbage collection should take minimal time, but this may not always be possible. The Enterprise Server's JVM can be configured to have many short GC pauses or a small number of relatively longer GC pauses. When a small number of GC pauses is your strategy, the throughput is generally greater, with 1–2% of requests experiencing latency.
Disabling the security manager may improve performance but may decrease system security. The default is Yes.
Note - This option is grayed out if Security Manager is already disabled on the Configuration->Security settings page for the selected configuration. The Performance Tuner controls only enable you to disable Security Manager if it is currently enabled. If it is currently disabled, you can only enable it from the Configuration->Security page.
Disabling access logging may improve performance but removes some system information. The default is Yes.
Note - This option is grayed out if Access Logging is already disabled on the Configuration->HTTP Service settings page for the selected configuration. The Performance Tuner controls only enable you to disable Access Logging if it is currently enabled. If it is currently disabled, you can only enable it from the Configuration->HTTP Service page.
Check this box if the server instances are running on a SPARC Enterprise T-Series Server. The default is No.
For more information, see http://www.oracle.com/us/products/servers-storage/servers/sparc-enterprise/t-series/index.html.
The Confirm Changes (Step 2 of 2) page opens.
For example, if the change adds or removes a JVM option, the option is displayed in the Current Setting or Proposed Setting column, and the following text is displayed in the To Manually Apply column:
Go to the JVM Settings page for the configuration, Select the JVM Options tab, Select the Add JVM Option button, and enter the JVM option. Or use one of these commands: asadmin create-jvm-options or asadmin delete-jvm-options
For more information about the asadmin subcommands referred to in the To Manually Apply column, see the Oracle GlassFish Server 3.1 Reference Manual.
For example, to remove the -Xmx512m option, use the following asadmin subcommand. Note that the dash must be escaped with a backslash and the option must be quoted.
asadmin delete-jvm-options "\-Xmx512m"
Note - If you add server instances to a cluster, you should retune the configuration for that cluster.