ZGC heap size and RSS counters

Aleksey Shipilev shade at redhat.com
Mon Dec 11 13:50:21 UTC 2017

On 12/11/2017 02:26 PM, Roman Kennke wrote:
> However, it would require to mask out that bit in all read-barriers (what you call load-barriers)
> and write-barriers, and thus impact performance in the very common paths (oom-during-evac basically
> never happens. except when it does). When we double-map the heap, we can flip the bit such that the
> fwd ptr now points to he alias mapping, and that aliased fwd pointer can still be used for memory
> addressing.

That's actually the thing that pushed us towards aliased heap. We measured up to 5% additional
overhead if we do simple masking on RB paths, making this a no-go throughput-budget-wise. And doing
aliased heap raises RSS accounting questions, as we see with ZGC and current kernels. So, we have
two imperfect solutions on our hands :)


More information about the zgc-dev mailing list