Use higher resolution for max residency measurements in performance tests.
GHC has quite a few performance tests, some of those measuring max residency.
However residency is a notoriously unreliable metric.
Use RTS flags like
+RTS -h -i0 -A100k to tune the frequency of residency snapshots (at the cost of runtime for the test).
The exact frequency can also be tuned via higher or lower allocation area (or actual -i times other than zero).
It won't change the fact that it will be a unreliable metric, but it should make it less so.