A method and computer program product for garbage collection sensitive
load balancing is disclosed for memory tuning for garbage collection and
CPU utilization optimization An application is benchmarked across
multiple different heap sizes to accumulate garbage collection metrics
and the garbage collection metrics accumulated during benchmarking are
utilized to compute both CPU utilization and garbage collection time for
each of a selection of candidate heap sizes. One of the candidate heap
sizes can be matched to a desired CPU utilization and garbage collection
time, and the matched one of the candidate heap sizes can be applied to a
host environment.