6.2.2 Optimal Throughput GC policy

Optimal Throughput is a single generation Mark Sweep Compact (MSC) Stop-The-World collector. It is the default GC policy and is designed with speed in mind, so lengthy pauses during GC are to be expected.

Use Optimal Throughput when you want an application to run to completion as quickly as possible. This goal is usually at odds with typical WebSphere applications, but may be appropriate for very short-running applications.

Because Optimal Throughput is the default GC policy, no runtime option is required, although it can be set explicitly by entering -Xgcpolicy:optthruput in the Generic JVM arguments field in the Java Virtual Machine Process Definition page in the WebSphere Application Server administration console.

To open the Java Virtual Machine settings page:

1. Open the WebSphere integrated solutions console.

2. In the navigation tree, expand Servers and click Application servers.

3. Select the desired appserver.

4. Under the Server Infrastructure heading, expand Java and Process Management and click Process Definition.

5. Under Additional Properties, select Java Virtual Machine.

Figure 6-1 shows the console page used to access these settings.

Figure 6-1 Setting garbage collection policy in the Java Virtual Machine Process Definition page