In G1, when we are unable to do an evacuation pause because the GC locker is active, we expand the eden to ensure mutator threads can still allocate (see 6994056: G1: when GC locker is active, extend the Eden instead of allocating into the old gen). Typically, we expect to have to expand the Eden by one region, maybe two, since we are expecting the GC locker critical sections to be most of the time short.
Ramki made a customer point that, while we're expanding the eden it might be worthwhile to artificially decrease the TLAB size. If the critical section is indeed very short, threads that do allocate TLABs in the expanded eden will probabably allocate only a few objects before the GC locker becomes inactive and we are allowed to do a collection. So, it will not be beneficial to allocate potentially large TLABs most of which will be wasted. In fact, allocating smaller TLABs might allow more threads to be able to allocate out of a smaller number of regions and decrease the eden expansion rate while the GC locker is active.
Posted Date : 2010-12-07 22:02:26.0