代码拉取完成,页面将自动刷新
From f3ec83e45b3c6f7f3183c2726701dccd11a00550 Mon Sep 17 00:00:00 2001
Date: Wed, 3 Jun 2020 09:39:34 +0000
Subject: [PATCH] ZGC: correct free heap size excluding waste in
rule_allocation_rate
Summary: <gc>: <need to consider waste for free heap size >
LLT:
Bug url:
---
src/hotspot/share/gc/z/zDirector.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/hotspot/share/gc/z/zDirector.cpp b/src/hotspot/share/gc/z/zDirector.cpp
index 209bf0a..6f894c3 100644
--- a/src/hotspot/share/gc/z/zDirector.cpp
+++ b/src/hotspot/share/gc/z/zDirector.cpp
@@ -120,7 +120,9 @@ bool ZDirector::rule_allocation_rate() const {
// the allocation rate variance, which means the probability is 1 in 1000
// that a sample is outside of the confidence interval.
const double max_alloc_rate = (ZStatAllocRate::avg() * ZAllocationSpikeTolerance) + (ZStatAllocRate::avg_sd() * one_in_1000);
- const double time_until_oom = free / (max_alloc_rate + 1.0); // Plus 1.0B/s to avoid division by zero
+
+ // Plus 1.0B/s to avoid division by zero. Small or medium page allow 12.5% waste, so 87.5% used.
+ const double time_until_oom = (0.875 * free) / (max_alloc_rate + 1.0);
// Calculate max duration of a GC cycle. The duration of GC is a moving
// average, we add ~3.3 sigma to account for the GC duration variance.
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。