GC(分配失败)-为何要在GC日志中显示此消息?

时间:2019-05-22 08:34:07

标签: java

我有一个具有以下Config的Java应用程序 -Xms1000M -Xmx1000M -XX:NewRatio=3 GC日志中充满了分配失败消息 我应该担心它对吞吐量(?)或任何其他性能的影响,因为声明的消息的频率非常高。

堆配置已被修改三次,如下所示

1 - Min Heap 100m | Max Heap 1G
2 - Min Heap 1G | Max Heap 1G
3 - Min Heap 1G | Max Heap 1G | NewRatio set to 3

下面是示例日志

Heap after GC invocations=7753 (full 11):
 PSYoungGen      total 251904K, used 213K [0x00000000f0600000, 0x0000000100000000, 0x0000000100000000)
  eden space 247296K, 0% used [0x00000000f0600000,0x00000000f0600000,0x00000000ff780000)
  from space 4608K, 4% used [0x00000000ffb80000,0x00000000ffbb5720,0x0000000100000000)
  to   space 4096K, 0% used [0x00000000ff780000,0x00000000ff780000,0x00000000ffb80000)
 ParOldGen       total 768000K, used 556319K [0x00000000c1800000, 0x00000000f0600000, 0x00000000f0600000)
  object space 768000K, 72% used [0x00000000c1800000,0x00000000e3747ef0,0x00000000f0600000)
 Metaspace       used 63917K, capacity 66654K, committed 67224K, reserved 1107968K
  class space    used 8525K, capacity 8982K, committed 9128K, reserved 1048576K
}
{Heap before GC invocations=7754 (full 11):
 PSYoungGen      total 251904K, used 247350K [0x00000000f0600000, 0x0000000100000000, 0x0000000100000000)
  eden space 247296K, 99% used [0x00000000f0600000,0x00000000ff758130,0x00000000ff780000)
  from space 4608K, 4% used [0x00000000ffb80000,0x00000000ffbb5720,0x0000000100000000)
  to   space 4096K, 0% used [0x00000000ff780000,0x00000000ff780000,0x00000000ffb80000)
 ParOldGen       total 768000K, used 556319K [0x00000000c1800000, 0x00000000f0600000, 0x00000000f0600000)
  object space 768000K, 72% used [0x00000000c1800000,0x00000000e3747ef0,0x00000000f0600000)
 Metaspace       used 63917K, capacity 66654K, committed 67224K, reserved 1107968K
  class space    used 8525K, capacity 8982K, committed 9128K, reserved 1048576K
2019-05-22T04:30:29.871-0400: 47838.953: [GC (Allocation Failure) [PSYoungGen: 247350K->266K(251392K)] 803669K->556586K(1019392K), 0.0086911 secs] [Times: u
ser=0.05 sys=0.00, real=0.01 secs]
Heap after GC invocations=7754 (full 11):
 PSYoungGen      total 251392K, used 266K [0x00000000f0600000, 0x0000000100000000, 0x0000000100000000)
  eden space 247296K, 0% used [0x00000000f0600000,0x00000000f0600000,0x00000000ff780000)
  from space 4096K, 6% used [0x00000000ff780000,0x00000000ff7c2be0,0x00000000ffb80000)
  to   space 4096K, 0% used [0x00000000ffc00000,0x00000000ffc00000,0x0000000100000000)
 ParOldGen       total 768000K, used 556319K [0x00000000c1800000, 0x00000000f0600000, 0x00000000f0600000)
  object space 768000K, 72% used [0x00000000c1800000,0x00000000e3747ef0,0x00000000f0600000)
 Metaspace       used 63917K, capacity 66654K, committed 67224K, reserved 1107968K
  class space    used 8525K, capacity 8982K, committed 9128K, reserved 1048576K
}
{Heap before GC invocations=7755 (full 11):
 PSYoungGen      total 251392K, used 247341K [0x00000000f0600000, 0x0000000100000000, 0x0000000100000000)
  eden space 247296K, 99% used [0x00000000f0600000,0x00000000ff748930,0x00000000ff780000)
  from space 4096K, 6% used [0x00000000ff780000,0x00000000ff7c2be0,0x00000000ffb80000)
  to   space 4096K, 0% used [0x00000000ffc00000,0x00000000ffc00000,0x0000000100000000)
 ParOldGen       total 768000K, used 556319K [0x00000000c1800000, 0x00000000f0600000, 0x00000000f0600000)
  object space 768000K, 72% used [0x00000000c1800000,0x00000000e3747ef0,0x00000000f0600000)
 Metaspace       used 63917K, capacity 66654K, committed 67224K, reserved 1107968K
  class space    used 8525K, capacity 8982K, committed 9128K, reserved 1048576K
2019-05-22T04:30:29.933-0400: 47839.015: [GC (Allocation Failure) [PSYoungGen: 247341K->310K(252416K)] 803661K->556629K(1020416K), 0.0038875 secs] [Times: u
ser=0.01 sys=0.00, real=0.00 secs]
Heap after GC invocations=7755 (full 11):
 PSYoungGen      total 252416K, used 310K [0x00000000f0600000, 0x0000000100000000, 0x0000000100000000)
  eden space 248320K, 0% used [0x00000000f0600000,0x00000000f0600000,0x00000000ff880000)
  from space 4096K, 7% used [0x00000000ffc00000,0x00000000ffc4d8c0,0x0000000100000000)
  to   space 3584K, 0% used [0x00000000ff880000,0x00000000ff880000,0x00000000ffc00000)
 ParOldGen       total 768000K, used 556319K [0x00000000c1800000, 0x00000000f0600000, 0x00000000f0600000)
  object space 768000K, 72% used [0x00000000c1800000,0x00000000e3747ef0,0x00000000f0600000)
 Metaspace       used 63917K, capacity 66654K, committed 67224K, reserved 1107968K
  class space    used 8525K, capacity 8982K, committed 9128K, reserved 1048576K


{Heap before GC invocations=7756 (full 11):
 PSYoungGen      total 252416K, used 248496K [0x00000000f0600000, 0x0000000100000000, 0x0000000100000000)
  eden space 248320K, 99% used [0x00000000f0600000,0x00000000ff85e808,0x00000000ff880000)
  from space 4096K, 7% used [0x00000000ffc00000,0x00000000ffc4d8c0,0x0000000100000000)
  to   space 3584K, 0% used [0x00000000ff880000,0x00000000ff880000,0x00000000ffc00000)
 ParOldGen       total 768000K, used 556319K [0x00000000c1800000, 0x00000000f0600000, 0x00000000f0600000)
  object space 768000K, 72% used [0x00000000c1800000,0x00000000e3747ef0,0x00000000f0600000)
 Metaspace       used 63917K, capacity 66654K, committed 67224K, reserved 1107968K
  class space    used 8525K, capacity 8982K, committed 9128K, reserved 1048576K
2019-05-22T04:30:29.991-0400: 47839.073: [GC (Allocation Failure) [PSYoungGen: 248496K->347K(251904K)] 804815K->556667K(1019904K), 0.0049925 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
Heap after GC invocations=7756 (full 11):
 PSYoungGen      total 251904K, used 347K [0x00000000f0600000, 0x0000000100000000, 0x0000000100000000)
  eden space 248320K, 0% used [0x00000000f0600000,0x00000000f0600000,0x00000000ff880000)
  from space 3584K, 9% used [0x00000000ff880000,0x00000000ff8d6ec8,0x00000000ffc00000)
  to   space 3584K, 0% used [0x00000000ffc80000,0x00000000ffc80000,0x0000000100000000)
 ParOldGen       total 768000K, used 556319K [0x00000000c1800000, 0x00000000f0600000, 0x00000000f0600000)
  object space 768000K, 72% used [0x00000000c1800000,0x00000000e3747ef0,0x00000000f0600000)
 Metaspace       used 63917K, capacity 66654K, committed 67224K, reserved 1107968K
  class space    used 8525K, capacity 8982K, committed 9128K, reserved 1048576K
}
{Heap before GC invocations=7757 (full 11):
 PSYoungGen      total 251904K, used 248589K [0x00000000f0600000, 0x0000000100000000, 0x0000000100000000)
  eden space 248320K, 99% used [0x00000000f0600000,0x00000000ff86c670,0x00000000ff880000)
  from space 3584K, 9% used [0x00000000ff880000,0x00000000ff8d6ec8,0x00000000ffc00000)
  to   space 3584K, 0% used [0x00000000ffc80000,0x00000000ffc80000,0x0000000100000000)
 ParOldGen       total 768000K, used 556319K [0x00000000c1800000, 0x00000000f0600000, 0x00000000f0600000)
  object space 768000K, 72% used [0x00000000c1800000,0x00000000e3747ef0,0x00000000f0600000)
 Metaspace       used 63917K, capacity 66654K, committed 67224K, reserved 1107968K
  class space    used 8525K, capacity 8982K, committed 9128K, reserved 1048576K
2019-05-22T04:30:30.051-0400: 47839.133: [GC (Allocation Failure) [PSYoungGen: 248589K->381K(252416K)] 804909K->556700K(1020416K), 0.0048151 secs] [Times: user=0.02 sys=0.00, real=0.00 secs]
Heap after GC invocations=7757 (full 11):
 PSYoungGen      total 252416K, used 381K [0x00000000f0600000, 0x0000000100000000, 0x0000000100000000)
  eden space 248832K, 0% used [0x00000000f0600000,0x00000000f0600000,0x00000000ff900000)
  from space 3584K, 10% used [0x00000000ffc80000,0x00000000ffcdf4d0,0x0000000100000000)
  to   space 3584K, 0% used [0x00000000ff900000,0x00000000ff900000,0x00000000ffc80000)
 ParOldGen       total 768000K, used 556319K [0x00000000c1800000, 0x00000000f0600000, 0x00000000f0600000)
  object space 768000K, 72% used [0x00000000c1800000,0x00000000e3747ef0,0x00000000f0600000)
 Metaspace       used 63917K, capacity 66654K, committed 67224K, reserved 1107968K
  class space    used 8525K, capacity 8982K, committed 9128K, reserved 1048576K
}
{Heap before GC invocations=7758 (full 11):
 PSYoungGen      total 252416K, used 248944K [0x00000000f0600000, 0x0000000100000000, 0x0000000100000000)
  eden space 248832K, 99% used [0x00000000f0600000,0x00000000ff8bcb70,0x00000000ff900000)
  from space 3584K, 10% used [0x00000000ffc80000,0x00000000ffcdf4d0,0x0000000100000000)
  to   space 3584K, 0% used [0x00000000ff900000,0x00000000ff900000,0x00000000ffc80000)
 ParOldGen       total 768000K, used 556319K [0x00000000c1800000, 0x00000000f0600000, 0x00000000f0600000)
  object space 768000K, 72% used [0x00000000c1800000,0x00000000e3747ef0,0x00000000f0600000)
 Metaspace       used 63917K, capacity 66654K, committed 67224K, reserved 1107968K
  class space    used 8525K, capacity 8982K, committed 9128K, reserved 1048576K

0 个答案:

没有答案