Performance Tuner in Oracle GlassFish Server 3.1

The Performance Tuner is now again available in Oracle GlassFish Server 3.1 (docs). This handy tool was first introduced in GlassFish v2.1 as one of the value-add features. You'll enjoy the same performance gains as before. Quoting from previous Ken's previous blog, "The Tuner typically improves performance by 300% or more, and on Oracle's T-Series hardware the performance gain can be greater than 600%!" Wow! The code was ported over from v2.1 with some refactoring to get it working for 3.1.

To really get the best performance out of GlassFish Server 3.1, I recommend getting the Performance Tuner. It is very easy to use. The first page will ask you 7 questions about your particular system and resource usage. There is both inline help and online help to guide you. If you need more detailed information about each of the questions, click the Help button in the upper right of the Admin Console to open the online help.

To starting using the Performance Tuner, first, you decide which configuration you want to tune. This could be the DAS ("server"), a cluster, or a stand-alone instance. For example, let's say I have a cluster with several instances, each running on the new SPARC T3-4 server which I would like to tune. First I make sure the cluster is running. Then I gather some information about my system and the application I'm running.

The SPARC T3-4 server has 64 cores - that's 4 SPARC T3 processors with 16 cores each, and up to 512 GB of memory. I'll allocate something less than 64 cores for the GlassFish server instances - let's say 32 cores, so I enter 32 for the Number of Threads (Logical CPUs).

And I'll specify the heap memory for the GlassFish Server's JVM server instance, to be something less than 512 GB. Let's say 12 GB.

Let's also say the application deployed on the cluster spends a lot of time in the database tier, so I'll select 'HIGH {>=20%) for Allocation Time for Database Access.

I'll keep the default Garbage Collection Strategy of Maximum Peak Throughput (Higher GC Pause.)

The next two questions only apply if the Security Manager or Access Logger is enabled. Since I already have Security Manager and Access Logger disabled, those checkboxes are greyed out.

Since I'm running on a SPARC T-Series Server, I can check the last box.

When I click on the Next button, the second page will display the proposed configuration changes. The table will show what would be added, removed, or changed. If you do not want the Performance Tuner to apply all the changes for you, you can selectively make manual updates using the manual instructions that is provided for each proposed configuration change. If you are satisfied with the proposed changes and want the Performance Tuner to apply the changes click on the Confirm button. For the new changes to take effect the cluster needs to be restarted. A backup of the domain.xml is made in domain1/config/tuner should you need to revert the changes. Just copy the domain_1.xml to domain1/config to go back to the original configuration.

Here's what the first page looks like:

Here's what the second page looks like:

This second page is a table of all the items to be added, removed, or changed. From here you can see the first two items to be changed: Maximum Connections attribute of the http element. If we confirm to apply the changes, the value of Maximum Connections attribute would change from 256 to 10000.

Also, you will see on the right-hand column, the manual steps if you want to do this yourself using either the Admin Console or the asadmin set command.

Once we confirm to apply the changes, we can see that the DAS domain.xml has been updated. The max-connections for http-listener-1 and http-listener-2 are "10000".

<config name="cluster1-config"> ............................... <network-config> <protocols> <protocol name="http-listener-1"> <http max-connections="10000" default-virtual-server="server"> <file-cache></file-cache> </http> </protocol> <protocol security-enabled="true" name="http-listener-2"> <http max-connections="10000" default-virtual-server="server"> <file-cache></file-cache> </http> <ssl ssl3-enabled="false" classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl> </protocol> <protocol name="admin-listener"> <http max-connections="250" default-virtual-server="__asadmin"> <file-cache></file-cache> </http> </protocol> </protocols> .................................. </network-config>

Restart the cluster for changes to take effect.

Another tip is that if one of the instance's configuration in the cluster needs to be tweaked for JVM Heap size, GC threads, or max-thread-pool-size, you can override the value that was set by the Performance Tuner easily. The Performance Tuner creates a system property in both the server and the cluster config elements. The system properties in the server will override the system properties in the cluster config. If we need to tweak the JVM Heap size for instance1, we can do it here

<server name="instance1" node-ref="localhost-domain1" config-ref="cluster1-config"> <system-property name="JVM_HEAP_SIZE" value="1200m"></system-property> <system-property name="JVM_HEAP_SIZE_XMN" value="600m"></system-property> <system-property name="JVM_PARALLEL_GC_THREADS" value="24"></system-property> <system-property name="MAX_THREAD_POOL_SIZE" value="128"></system-property> </server>

You can watch a brief video of the Performance Tuner - Performance Tuner Demo.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Jennifer Chou

Search

Categories
Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today