Jvm使用的内存比Native Memory Tracking更多,我如何找到额外的内容?

时间:2017-06-24 08:09:45

标签: memory-leaks jvm

我正在我的网络服务器上运行码头。我当前的jvm设置:-Xmx4g -Xms2g,但是jetty使用了更多的内存,我不知道这些额外的内存在哪里。

Jetty总共使用4.547g内存:

enter image description here

堆使用情况显示堆内存使用量为2.5g:

Heap Usage:
New Generation (Eden + 1 Survivor Space):
   capacity = 483196928 (460.8125MB)
   used     = 277626712 (264.76546478271484MB)
   free     = 205570216 (196.04703521728516MB)
   57.45622455612963% used
Eden Space:
   capacity = 429522944 (409.625MB)
   used     = 251267840 (239.627685546875MB)
   free     = 178255104 (169.997314453125MB)
   58.4992824038755% used
From Space:
   capacity = 53673984 (51.1875MB)
   used     = 26358872 (25.137779235839844MB)
   free     = 27315112 (26.049720764160156MB)
   49.109214624351345% used
To Space:
   capacity = 53673984 (51.1875MB)
   used     = 0 (0.0MB)
   free     = 53673984 (51.1875MB)
   0.0% used
concurrent mark-sweep generation:
   capacity = 2166849536 (2066.46875MB)
   used     = 1317710872 (1256.6670150756836MB)
   free     = 849138664 (809.8017349243164MB)
   60.81229222922842% used

仍然缺少2g,然后我使用本机内存跟踪,它显示:

Total: reserved=5986478KB, committed=3259678KB
-                 Java Heap (reserved=4194304KB, committed=2640352KB)
                            (mmap: reserved=4194304KB, committed=2640352KB) 

-                     Class (reserved=1159154KB, committed=122778KB)
                            (classes #18260)
                            (malloc=4082KB #62204) 
                            (mmap: reserved=1155072KB, committed=118696KB) 

-                    Thread (reserved=145568KB, committed=145568KB)
                            (thread #141)
                            (stack: reserved=143920KB, committed=143920KB)
                            (malloc=461KB #707) 
                            (arena=1187KB #280)

-                      Code (reserved=275048KB, committed=143620KB)
                            (malloc=25448KB #30875) 
                            (mmap: reserved=249600KB, committed=118172KB) 

-                        GC (reserved=25836KB, committed=20792KB)
                            (malloc=11492KB #1615) 
                            (mmap: reserved=14344KB, committed=9300KB) 

-                  Compiler (reserved=583KB, committed=583KB)
                            (malloc=453KB #769) 
                            (arena=131KB #3)

-                  Internal (reserved=76399KB, committed=76399KB)
                            (malloc=76367KB #25878) 
                            (mmap: reserved=32KB, committed=32KB) 

-                    Symbol (reserved=21603KB, committed=21603KB)
                            (malloc=17791KB #201952) 
                            (arena=3812KB #1)

-    Native Memory Tracking (reserved=5096KB, committed=5096KB)
                            (malloc=22KB #261) 
                            (tracking overhead=5074KB)

-               Arena Chunk (reserved=190KB, committed=190KB)
                            (malloc=190KB) 

-                   Unknown (reserved=82696KB, committed=82696KB)
                            (mmap: reserved=82696KB, committed=82696KB)

仍然没有解释记忆的去向,有人能说明如何找到丢失的记忆吗?

0 个答案:

没有答案