Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 1073741824 (1024.0MB)
NewSize = 1310720 (1.25MB)
MaxNewSize = 17592186044415 MB
OldSize = 5439488 (5.1875MB)
NewRatio = 2
SurvivorRatio = 8
PermSize = 157286400 (150.0MB)
MaxPermSize = 157286400 (150.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 19922944 (19.0MB)
used = 19911792 (18.989364624023438MB)
free = 11152 (0.0106353759765625MB)
99.94402433696546% used
From Space:
capacity = 12517376 (11.9375MB)
used = 0 (0.0MB)
free = 12517376 (11.9375MB)
0.0% used
To Space:
capacity = 13303808 (12.6875MB)
used = 0 (0.0MB)
free = 13303808 (12.6875MB)
0.0% used
PS Old Generation
capacity = 715849728 (682.6875MB)
used = 715848480 (682.6863098144531MB)
free = 1248 (0.001190185546875MB)
99.99982566173442% used
PS Perm Generation
capacity = 157286400 (150.0MB)
used = 79364440 (75.68782806396484MB)
free = 77921960 (74.31217193603516MB)
50.45855204264323% used
明明内存还有空余的,为什么不继续扩展Eden
和Survivor
区呢,另一台一样配置的机器 OOM 的时候是这样的:
Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 1073741824 (1024.0MB)
NewSize = 1310720 (1.25MB)
MaxNewSize = 17592186044415 MB
OldSize = 5439488 (5.1875MB)
NewRatio = 2
SurvivorRatio = 8
PermSize = 157286400 (150.0MB)
MaxPermSize = 157286400 (150.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 119341056 (113.8125MB)
used = 119253176 (113.72869110107422MB)
free = 87880 (0.08380889892578125MB)
99.92636230736889% used
From Space:
capacity = 111869952 (106.6875MB)
used = 0 (0.0MB)
free = 111869952 (106.6875MB)
0.0% used
To Space:
capacity = 111149056 (106.0MB)
used = 0 (0.0MB)
free = 111149056 (106.0MB)
0.0% used
PS Old Generation
capacity = 715849728 (682.6875MB)
used = 715849720 (682.6874923706055MB)
free = 8 (7.62939453125E-6MB)
99.99999888244702% used
PS Perm Generation
capacity = 157286400 (150.0MB)
used = 110605624 (105.48174285888672MB)
free = 46680776 (44.51825714111328MB)
70.32116190592448% used
这台看起来就比较正常,内存是真的用完了
求解第一台 OOM 的原因
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.