Trade-offs for `threshold1` and `threshold2`

Increasing `threshold1` and `threshold2` (for Generations 1 and 2) reduces the frequency of older generation collections. This can decrease CPU overhead for applications with many long-lived objects by letting them survive longer, but it risks increased memory footprint if unreferenced objects are retained for extended periods.

Sources

Open the full topic