Skip to content
About
Main content
Model

Garbage-collection overhead and headroom

GC cost ≈ live set ÷ headroom. Tuning moves you along that curve; off-heap changes which term you are standing on.

Heap
the heap size
Live set
the live set

Recurring principle: Immutable storage grows indirection

How it behaves

One input on the horizontal axis, the others held fixed.

Data table
Relative collector overhead by heap ÷ live set
Heap ÷ live set H/LOverhead (relative)
1.0520×
1.166.18×
1.273.65×
1.392.59×
1.52.01×
1.611.64×
1.721.39×
1.831.2×
1.941.06×
2.060.946×
2.170.856×
2.280.781×
2.390.718×
2.50.665×
2.620.619×
2.730.579×
2.840.543×
2.950.512×
3.060.485×
3.180.46×
3.290.437×
3.40.417×
3.510.398×
3.620.381×
3.730.366×
3.850.351×
3.960.338×
4.070.326×
4.180.314×
4.290.304×
4.410.294×
4.520.284×
4.630.275×
4.740.267×
4.850.259×
4.970.252×
5.080.245×
5.190.239×
5.30.232×
5.410.227×
5.520.221×
5.640.216×
5.750.211×
5.860.206×
5.970.201×
6.080.197×
6.20.192×
6.310.188×
6.420.185×
6.530.181×
6.640.177×
6.760.174×
6.870.17×
6.980.167×
7.090.164×
7.20.161×
7.310.158×
7.430.156×
7.540.153×
7.650.15×
7.760.148×
7.870.145×
7.990.143×
8.10.141×
8.210.139×
8.320.137×
8.430.135×
8.550.133×
8.660.131×
8.770.129×
8.880.127×
8.990.125×
9.110.123×
9.220.122×
9.330.12×
9.440.118×
9.550.117×
9.660.115×
9.780.114×
9.890.113×
100.111×

Worked examples, recomputed

Every number the mechanisms quote for this relationship is recomputed from it, so none of them disagrees with it.

Where it appears

Each mechanism states it in its own names. The general symbol each name stands for is shown with it.