Vary garbage collection policy
The impact of the possible JVM garbage collection policies were tested in this scenario.
Table 1 describes the four possible JVM garbage collection policies that can be set for the JVM.
| Policy | Option | Description |
|---|---|---|
| Optimize for throughput | Xgcpolicy:optthruput (optional) | This is the default policy. It is typically used for applications where overall throughput is more important than short garbage collection pauses. The application is stopped each time that garbage is collected. |
| Optimize for pause time | Xgcpolicy:optavgpause | Trades off higher throughput for shorter garbage collection pauses by performing some of the garbage collection concurrently. The application is paused for shorter periods. |
| Generational concurrent | Xgcpolicy:gencon | Handles short-lived objects differently than objects that are long-lived. Applications that have many short-lived objects can see shorter pause times with this policy, while still producing good throughput. |
| Subpooling | Xgcpolicy:gencon | Uses an algorithm similar to the default policy's, but uses an allocation strategy that is more suitable for multiprocessor machines. This policy is of benefit to SMP machines with 16 or more processors. This policy is available only on IBM®System p® and IBM System z® platforms. Applications that need to scale on large machines can benefit from this policy. |
This test case was run to see if changing the JVM's garbage collection policy would have any effect on the throughput. The workload driver was set to 30 clients for all runs and Trade was set to Distributed Map caching. The standard configuration with WebSphere® Edge Services Caching Proxy Server was used.
| DynaCache size | Caching mode | Servlet caching | Replication domain | Replication type |
|---|---|---|---|---|
| 20000 | Distributed Map | Disabled | Entire domain | Not shared |
Observations
The default garbage collection policy of optimize for throughput resulted in the highest throughput. The other garbage collection policies resulted in lower throughput with optimize for time having the lowest throughput.
Conclusion
For the Trade workload, the default garbage collection policy produced the best throughput.