Specify Garbage Collection
2.4 Garbage Collection In our internal testing, we have seen better performance using the parallel collector on the old genereration - XX:+UseParallelOldGC. We have seen throughput be almost 20% higher using this collector as opposed to the CMS collector which does parallel collection on the Eden space. If you don't specify the -XX:+UseParallelOldGC, the throughput collector defaults to parallel collection on the Eden space and single threaded collection on the Old generation. In our tests, this a 12GB heap with the Old generation 8GB in size. That's a lot of memory to garbage collect in a single thread fashion. By specifying that the Old generation should also be collected in parallel, you get the collection algorithms designed for the highest throughput, which is why its called the throughput collector to begin with, running against both memory pools. In fact, when you specify -XX:+UseParallelOldGC, it automatically sets -XX:+UseParNewGC so you don't have to specify both. In comparison, the CMS collector is not actually designed for throughput but for more predictable response times. Choose your collector based on your needs. This document is about tuning for throughput, not response time. If you want consistent response times, you might be better off with the CMS collector. With all that being said, below is our recommendation for highest througput (with the catch that your response times might higher variances) (assumes a 12GB heap): java -server -Xms12288m -Xmx12288m -XX:+UseLargePages -XX:UseParallelOldGC