2. What’s OOMjava.lang.OutOfMemoryError: {$reason}
GC overhead limit exceeded
Java Heap Space
Unable to create new native thread
PermGen Space
request {} bytes for {}. Out of swap space?
3. OOM will causeGC overhead limit exceeded
Java Heap Space
未处理异常会造成线程退出
线程调度慢
系统响应慢或无响应
because gc频繁
Out of Swap
Java进程crash
4. Why OOMGC overhead limit exceeded
Java Heap Space
存活的对象超过了Heap的大小;
Out of Swap
地址空间不够用了
堆外内存(物理内存 + Swap)不够用了
5. OOM ToolBox IGC overhead limit exceeded
Java Heap Space
-XX:+HeapDumpOnOutOfMemoryError
jmap –histo pid
jmap –dump:file={filename},format=b pid
tprofiler –histo:depth=3 pid
eclipse mat (one big memory machine)
btrace
6. OOM ToolBox IIOut of Swap
ps aux
google-perftools
7. OOM Case I – Simple
8. OOM Case II – What should I do
9. OOM Case III – What should I do
10. OOM Case IV – Oh,No-Xms4g –Xmx4g –Xmn2560m
11. OOM Case V – CIF
12. OOM Case VI – Out of swap
13. OOM Case VI – Out of swap Then to find who use Deflater.init
14. OOM SummaryGC overhead limit exceeded
Java Heap Space
monitor app log & gc log
heap dump or jmap –histo|-dump when oom
mat analyze heap dump
app developer or btrace to find where cause
15. OOM SummaryOut of swap
crash log
google-perftools
then btrace to find where cause