- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试调整 G1 GC。应用程序有时会运行一段时间,然后堆会变满,但它显示 Eden、survivor 和 old 区域为 0,并且会调用完整 GC 来释放空间。
我使用的标志:Xmx:30G -XX:+UseG1GC -XX:+AlwaysPreTouch -XX:+UseStringDeduplication -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+ExplicitGCInvokesConcurrent -XX:+ParallelRefProcEnabled-XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=12 -XX:ConcGCThreads=4
GC 日志:
{Heap before GC invocations=629 (full 0):
garbage-first heap total 31457280K, used 31434556K [0x0000000080000000, 0x0000000080807800, 0x0000000800000000)
region size 8192K, 0 young (0K), 0 survivors (0K)
Metaspace used 41962K, capacity 42424K, committed 42956K, reserved 1087488K
class space used 4589K, capacity 4749K, committed 4812K, reserved 1048576K
2017-12-07T14:47:41.979+0000: [GC pause (G1 Evacuation Pause) (young)
Desired survivor size 100663296 bytes, new threshold 15 (max 15)
18116.906: [G1Ergonomics (CSet Construction) start choosing CSet, _pending_cards: 0, predicted base time: 48.13 ms, remaining time: 151.87 ms, target pause time: 200.00 ms]
18116.906: [G1Ergonomics (CSet Construction) add young regions to CSet, eden: 0 regions, survivors: 0 regions, predicted young region time: 0.00 ms]
18116.906: [G1Ergonomics (CSet Construction) finish choosing CSet, eden: 0 regions, survivors: 0 regions, old: 0 regions, predicted pause time: 48.13 ms, target pause time: 200.00 ms]
2017-12-07T14:47:41.981+0000: [SoftReference, 0 refs, 0.0004177 secs]2017-12-07T14:47:41.981+0000: [WeakReference, 0 refs, 0.0002174 secs]2017-12-07T14:47:41.981+0000: [FinalReference, 0 refs, 0.0003298 secs]2017-12-07T14:47:41.982+0000: [PhantomReference, 0 refs, 0 refs, 0.0004635 secs]2017-12-07T14:47:41.982+0000: [JNI Weak Reference, 0.0000152 secs], 0.0439856 secs]
[Parallel Time: 1.4 ms, GC Workers: 12]
[GC Worker Start (ms): Min: 18116906.3, Avg: 18116906.3, Max: 18116906.4, Diff: 0.1]
[Ext Root Scanning (ms): Min: 0.5, Avg: 0.6, Max: 0.9, Diff: 0.4, Sum: 6.9]
[Update RS (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.1]
[Processed Buffers: Min: 0, Avg: 0.1, Max: 1, Diff: 1, Sum: 1]
[Scan RS (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Code Root Scanning (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Object Copy (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.4]
[Termination (ms): Min: 0.0, Avg: 0.6, Max: 0.7, Diff: 0.7, Sum: 6.8]
[Termination Attempts: Min: 1, Avg: 1.0, Max: 1, Diff: 0, Sum: 12]
[GC Worker Other (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.1]
[GC Worker Total (ms): Min: 1.2, Avg: 1.2, Max: 1.3, Diff: 0.1, Sum: 15.0]
[GC Worker End (ms): Min: 18116907.6, Avg: 18116907.6, Max: 18116907.6, Diff: 0.0]
[Code Root Fixup: 0.1 ms]
[Code Root Purge: 0.0 ms]
[String Dedup Fixup: 39.9 ms, GC Workers: 12]
[Queue Fixup (ms): Min: 0.0, Avg: 11.3, Max: 18.1, Diff: 18.1, Sum: 135.1]
[Table Fixup (ms): Min: 21.7, Avg: 27.8, Max: 35.2, Diff: 13.5, Sum: 333.3]
[Clear CT: 0.1 ms]
[Other: 2.5 ms]
[Choose CSet: 0.0 ms]
[Ref Proc: 1.6 ms]
[Ref Enq: 0.1 ms]
[Redirty Cards: 0.1 ms]
[Humongous Register: 0.2 ms]
[Humongous Reclaim: 0.0 ms]
[Free CSet: 0.1 ms]
[Eden: 0.0B(1536.0M)->0.0B(1536.0M) Survivors: 0.0B->0.0B Heap: 30.0G(30.0G)->30.0G(30.0G)]
Heap after GC invocations=630 (full 0):
garbage-first heap total 31457280K, used 31434556K [0x0000000080000000, 0x0000000080807800, 0x0000000800000000)
region size 8192K, 0 young (0K), 0 survivors (0K)
Metaspace used 41962K, capacity 42424K, committed 42956K, reserved 1087488K
class space used 4589K, capacity 4749K, committed 4812K, reserved 1048576K
}
[Times: user=0.49 sys=0.01, real=0.05 secs]
{Heap before GC invocations=630 (full 0):
garbage-first heap total 31457280K, used 31434556K [0x0000000080000000, 0x0000000080807800, 0x0000000800000000)
region size 8192K, 0 young (0K), 0 survivors (0K)
Metaspace used 41962K, capacity 42424K, committed 42956K, reserved 1087488K
class space used 4589K, capacity 4749K, committed 4812K, reserved 1048576K
2017-12-07T14:47:42.024+0000: [GC pause (G1 Evacuation Pause) (young)
Desired survivor size 100663296 bytes, new threshold 15 (max 15)
18116.952: [G1Ergonomics (CSet Construction) start choosing CSet, _pending_cards: 0, predicted base time: 47.06 ms, remaining time: 152.94 ms, target pause time: 200.00 ms]
18116.952: [G1Ergonomics (CSet Construction) add young regions to CSet, eden: 0 regions, survivors: 0 regions, predicted young region time: 0.00 ms]
18116.952: [G1Ergonomics (CSet Construction) finish choosing CSet, eden: 0 regions, survivors: 0 regions, old: 0 regions, predicted pause time: 47.06 ms, target pause time: 200.00 ms]
2017-12-07T14:47:42.026+0000: [SoftReference, 0 refs, 0.0003988 secs]2017-12-07T14:47:42.027+0000: [WeakReference, 0 refs, 0.0003844 secs]2017-12-07T14:47:42.027+0000: [FinalReference, 0 refs, 0.0002286 secs]2017-12-07T14:47:42.027+0000: [PhantomReference, 0 refs, 0 refs, 0.0004361 secs]2017-12-07T14:47:42.028+0000: [JNI Weak Reference, 0.0000169 secs], 0.0433898 secs]
[Parallel Time: 1.5 ms, GC Workers: 12]
[GC Worker Start (ms): Min: 18116952.0, Avg: 18116952.1, Max: 18116952.1, Diff: 0.1]
[Ext Root Scanning (ms): Min: 0.7, Avg: 0.8, Max: 0.9, Diff: 0.1, Sum: 9.5]
[Update RS (ms): Min: 0.0, Avg: 0.0, Max: 0.2, Diff: 0.2, Sum: 0.2]
[Processed Buffers: Min: 0, Avg: 0.1, Max: 1, Diff: 1, Sum: 1]
[Scan RS (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Code Root Scanning (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
[Object Copy (ms): Min: 0.0, Avg: 0.0, Max: 0.1, Diff: 0.1, Sum: 0.5]
[Termination (ms): Min: 0.0, Avg: 0.4, Max: 0.5, Diff: 0.5, Sum: 5.3]
[Termination Attempts: Min: 1, Avg: 1.0, Max: 1, Diff: 0, Sum: 12]
[GC Worker Other (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.1]
[GC Worker Total (ms): Min: 1.3, Avg: 1.3, Max: 1.4, Diff: 0.1, Sum: 16.1]
[GC Worker End (ms): Min: 18116953.4, Avg: 18116953.4, Max: 18116953.4, Diff: 0.0]
[Code Root Fixup: 0.1 ms]
[Code Root Purge: 0.0 ms]
[String Dedup Fixup: 39.2 ms, GC Workers: 12]
[Queue Fixup (ms): Min: 0.0, Avg: 11.4, Max: 15.4, Diff: 15.4, Sum: 136.9]
[Table Fixup (ms): Min: 23.7, Avg: 27.7, Max: 39.1, Diff: 15.4, Sum: 332.3]
[Clear CT: 0.1 ms]
[Other: 2.5 ms]
[Choose CSet: 0.0 ms]
[Ref Proc: 1.6 ms]
[Ref Enq: 0.1 ms]
[Redirty Cards: 0.1 ms]
[Humongous Register: 0.2 ms]
[Humongous Reclaim: 0.0 ms]
[Free CSet: 0.1 ms]
[Eden: 0.0B(1536.0M)->0.0B(1536.0M) Survivors: 0.0B->0.0B Heap: 30.0G(30.0G)->30.0G(30.0G)]
Heap after GC invocations=631 (full 0):
garbage-first heap total 31457280K, used 31434556K [0x0000000080000000, 0x0000000080807800, 0x0000000800000000)
region size 8192K, 0 young (0K), 0 survivors (0K)
Metaspace used 41962K, capacity 42424K, committed 42956K, reserved 1087488K
class space used 4589K, capacity 4749K, committed 4812K, reserved 1048576K
}
[Times: user=0.49 sys=0.00, real=0.04 secs]
18116.996: [G1Ergonomics (Heap Sizing) attempt heap expansion, reason: allocation request failed, allocation request: 16 bytes]
18116.997: [G1Ergonomics (Heap Sizing) expand the heap, requested expansion amount: 8388608 bytes, attempted expansion amount: 8388608 bytes]
18116.997: [G1Ergonomics (Heap Sizing) did not expand the heap, reason: heap already fully expanded]
{Heap before GC invocations=631 (full 0):
garbage-first heap total 31457280K, used 31434556K [0x0000000080000000, 0x0000000080807800, 0x0000000800000000)
region size 8192K, 0 young (0K), 0 survivors (0K)
Metaspace used 41962K, capacity 42424K, committed 42956K, reserved 1087488K
class space used 4589K, capacity 4749K, committed 4812K, reserved 1048576K
2017-12-07T14:47:42.069+0000: [Full GC (Allocation Failure) 2017-12-07T14:48:06.386+0000: [SoftReference, 122 refs, 0.0001069 secs]2017-12-07T14:48:06.386+0000: [WeakReference, 22631 refs, 0.0079235 secs]2017-12-07T14:48:06.394+0000: [FinalReference, 395 refs, 0.0005771 secs]2017-12-07T14:48:06.394+0000: [PhantomReference, 0 refs, 0 refs, 0.0000163 secs]2017-12-07T14:48:06.394+0000: [JNI Weak Reference, 0.0000357 secs] 29G->14G(30G), 53.8180666 secs]
[Eden: 0.0B(1536.0M)->0.0B(1536.0M) Survivors: 0.0B->0.0B Heap: 30.0G(30.0G)->14.4G(30.0G)], [Metaspace: 41962K->41951K(1087488K)]
Heap after GC invocations=632 (full 1):
garbage-first heap total 31457280K, used 15144510K [0x0000000080000000, 0x0000000080807800, 0x0000000800000000)
region size 8192K, 0 young (0K), 0 survivors (0K)
Metaspace used 41951K, capacity 42406K, committed 42956K, reserved 1087488K
class space used 4587K, capacity 4746K, committed 4812K, reserved 1048576K
}
请帮我找出问题所在以及如何避免完全GC。
最佳答案
这可能是OpenJDK bug 8165150 ,这意味着您在 Full GC 之前正在经历 noop young gen 回收。这不是最理想的,但只要发生完整 GC 并且可以释放 JVM 应该恢复的内存。
您可以通过确保堆中有足够的可用空间来避免此问题,确保您的应用程序不会泄漏,并在填满之前启动并发周期,例如通过调整 IHOP。
Full GC 之后的生命集大小仅为 14GiB,因此 60% 左右的 IHOP 可能会有所帮助。
关于Java 堆已满,但所有区域都是空的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47708603/
在使用 GDI 进行图形处理的传统 Windows 程序中,您必须担心只绘制需要重绘的窗口区域;这是“更新矩形”,可以通过 PAINTSTRUCT.rcPaint 或通过调用 GetUpdateRec
我对 TFS 中的所有内容感到困惑。有人可以解释一下所有这些是如何组合在一起的吗? 团队项目合集 团队项目 团队 地区 迭代 来自 this page,我认为一个(团队)项目集合可以包含多个(团队)项
这对我来说根本没有意义。创建新的 API 网关时,您可以指定它是区域优化的还是边缘优化的。但话又说回来,当您为 API Gateway 创建自定义域名时,您可以在两者之间进行选择。 最糟糕的是,您可以
我有一个工作表,其中包含我想循环遍历的许多不同区域。我将进行一些计算,并认为它比在列中逐个单元格地更快/更有效。 我尝试了一些不同的东西,但不知道如何跳到下一个区域。我已经发表了一些评论,最有希望的是
最近迁移到 TFS 2010 后,我想知道对于区域而言,最佳或最广泛接受的定义或配置是什么? 我能在网上找到的唯一有用的文章是 this one并且是我认为是正确的。然而,这让我开始思考是否以下任何一
我在“北欧”有一个存储帐户,现在我想使用生命周期管理将冷 blob 移动到存档层。 但是我每次尝试都会遇到以下失败:无法为存储帐户“myStorageAccount”添加生命周期管理规则。错误:管理策
我正在开发一个项目,您在扫描仪中输入州的缩写,然后程序会告诉您该州位于美国的哪个地区。我认为我的大部分代码都是正确的,但我有以前从未使用过 switch。 我已经将我的工作改进为一个错误,即我的第一个
我正在尝试学习 AngularJS,我想我有一个架构问题。 如果我想开始开发一个应用程序,比方说,比如 youtube,我如何在“区域”(比如 Marionette)中组织页面?我的意思是:顶部导航栏
我正在制作一个动态内存分配器,当我释放其中的一部分时,我需要检查我传递给函数的指针实际上是否在该区域内。我有一个指向 malloc 区域开头的指针 typedef unsigned char byte
有时我想看看 到底在哪里页面上图片上的标签。 在 Javascript 中有没有办法改变颜色或隐藏与区域标签对应的图像部分? 最佳答案 也许您正在寻找类似 mapper.js 的内容.它允许您在鼠标
我有一个使用 D3 js 创建的时间序列图表。我想为特定时间间隔添加高亮区域,以显示在该特定时间发生的特定事件(会有不同类型的事件,因此每个高亮标记将根据其类型具有不同的颜色)。我希望这个突出显示区域
我正在尝试创建网站的密码保护区。我想通过检查 MySql 表中的用户名和密码来允许访问,然后启动一个 session 并允许在 session 处于事件状态时访问多个页面。如果有人尝试直接访问这些页面
在 ScrollView 中我添加了几个按钮。正如您在图片中看到的,2 个按钮完全可见,第三个按钮半可见。当我向右滚动看到第三个时;1-如果滚动条很短,则它会滚动回到第一个位置。2- 如果滚动足够则显
我正在开发我的第一个 spritekit 应用程序,并且有一个关于如何处理我想到的事情的快速问题。我正在制作一个我想要的棋盘游戏原型(prototype),并希望在 iOS map 中进行一些集思广益
在我的 C# 程序中,我收到这样的日期和时间:DateTime.Now 我得到:19/09/2010 20:10:30 因为我的地区是:希伯来语(以色列) 但是如果我将我的程序安装在区域为 Engli
有时我在 Visual Studio 的源文件中运行(在我的例子中是 2010),我看到很多区域,我必须点击 + 号才能一个一个地打开它们! 是否有任何快捷方式或菜单选项可以使这对我来说更容易,并且对
关闭。这个问题是opinion-based .它目前不接受答案。 想要改进这个问题? 更新问题,以便 editing this post 可以用事实和引用来回答它. 关闭 7 年前。 Improve
我正在寻找二维数据中的峰值区域(如果您愿意,灰度图像或二维景观,通过霍夫变换创建)。 峰值区域是指局部最大峰值,但不是单个点而是周围的一部分strong>contributing region 随之而
我希望能够将任何字符或字符串转换为形状或区域,以便我可以按照我喜欢的任何大小、样式、效果等来绘制该字符。 更具体地说,我将使用视差绘制它,以便它仅在特定角度清晰定义(这就是为什么我不能使用 html
我非常喜欢数学(或者你们大多数人会说的“数学”!),但我还没有达到知道这个问题答案的程度。我有一个主圆,它可以在显示器上的任何 x 和 y 处有一个中心点。其他圆圈将随意在显示器周围移动,但在任何给定
我是一名优秀的程序员,十分优秀!