runtime: should there be a minimum heap size to trigger GC? (original) (raw)
The really tiny GCs (of less than 1 MB) are very sensitive to constant overheads in the GC. The usual 2x policy doesn't work great if the program has a consistent live data set of 100 kB. There are tons of GCs and the constants dominate.
Should we set a minimum heap size for GC like 1 MB, so that even if the previous GC ended with 100 kB of live data, we still wait until 1 MB (not 200 kB) before the next one?