As part of addressing the issue of excessive mark stack usage, it was observed that sometimes mark stack utilization can be very low. For example, casparcwang@tencent.com reported that when running Apache Zookeeper, mark stack utilization was ~10%.
The problem is that GC workers are a bit too eager to flush mark stacks. Currently, whenever a GC worker has drained its home stripe it will always flush all remaining mark stacks. This causes non-full mark stacks to be flushed. This in turn means that the GC worker who receives that non-full stack (small amount of work) tends to also produce non-full stacks (small amount of work) for other GC workers. This can lead to a vicious cycle, which results in excessive mark stack memory usage.
The problem is that GC workers are a bit too eager to flush mark stacks. Currently, whenever a GC worker has drained its home stripe it will always flush all remaining mark stacks. This causes non-full mark stacks to be flushed. This in turn means that the GC worker who receives that non-full stack (small amount of work) tends to also produce non-full stacks (small amount of work) for other GC workers. This can lead to a vicious cycle, which results in excessive mark stack memory usage.
- relates to
-
JDK-8262995 ZGC concurrent mark push to local strip
-
- Closed
-
-
JDK-8260267 ZGC: Reduce mark stack usage
-
- Resolved
-