O'Reilly logo

Release It! by Michael T. Nygard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Pattern10.4 Tune the Garbage Collector

In Java applications, garbage collection tuning is the quickest and easiest way to see some capacity improvements. An untuned application running at production volumes and traffic will probably spend 10% of its time collecting garbage. That should be reduced to 2% or less.

Modern garbage collectors are optimized for the typical bimodal distribution of object life spans. Most objects are ephemeral; they are created and discarded within microseconds. (Sun refers to this as infant mortality.) A much smaller population of objects are long-lived, often with life spans that match the program execution (singletons, service ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required