Jvm is using more memory than Native Memory Tracking says, how do I find where the extra meeory goes?

I am running jetty on my web server. My current jvm setting is -Xmx4g -Xms2g, however jetty uses a lot more memory and I don't know where this extra memory goes.

Jetty uses a total of 4,547g of memory:

enter image description here

Heap usage shows the usage of heap memory at 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

      

Another 2g is missing, then I use Native Memory Tracking, it shows:

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)

      

Until it explains where the memory goes, can someone shed some light on how to find the missing memory?

+3


source to share





All Articles