Когда я проверяю топ , в нем показано использование памяти 7,4 ГБ для приложения Java.
Варианты JVM следующие:
jvm.
Код: Выделить всё
-XX:MaxMetaspaceSize=512M -Xms2G -Xmx4G -XX:MaxTenuringThreshold=5 -XX:+UseStringDeduplication
-XX:MaxGCPauseMillis=200 -XX:+UseG1GC -XX:+DisableExplicitGC -XX:ParallelGCThreads=10
-Xmn3G -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=50 -XX:ReservedCodeCacheSize=512M
-Dnewrelic.config.agent_enabled=false -javaagent:opentelemetry-javaagent.jar -XX:+UnlockDiagnosticVMOptions
-XX:NativeMemoryTracking=detail -Xss512k
Ответ команды:
Код: Выделить всё
top - 12:10:31 up 3:27, 0 users, load average: 0.94, 0.99, 0.91
Tasks: 4 total, 1 running, 3 sleeping, 0 stopped, 0 zombie
%Cpu(s): 52.5 us, 6.8 sy, 0.0 ni, 39.0 id, 0.0 wa, 0.0 hi, 1.7 si, 0.0 st
MiB Mem : 15608.1 total, 3371.6 free, 8171.6 used, 4064.9 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 7182.3 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7 root 20 0 9746140 7.3g 35156 S 246.7 47.9 108:34.85 java
1 root 20 0 7364 3808 2768 S 0.0 0.0 0:00.02 entrypoint.sh
19324 root 20 0 7616 4276 2996 S 0.0 0.0 0:00.05 bash
23887 root 20 0 8792 3168 2600 R 0.0 0.0 0:00.00 top
7:
Native Memory Tracking:
(Omitting categories weighting less than 1KB)
Total: reserved=7289696KB, committed=6173120KB
malloc: 922776KB #2973265
mmap: reserved=6366920KB, committed=5250344KB
- Java Heap (reserved=4194304KB, committed=4194304KB)
(mmap: reserved=4194304KB, committed=4194304KB)
- Class (reserved=443634KB, committed=72754KB)
(classes #76052)
( instance classes #72779, array classes #3273)
(malloc=17650KB #295006)
(mmap: reserved=425984KB, committed=55104KB)
( Metadata: )
( reserved=393216KB, committed=390592KB)
( used=384771KB)
( waste=5821KB =1.49%)
( Class space:)
( reserved=425984KB, committed=55104KB)
( used=48155KB)
( waste=6949KB =12.61%)
- Thread (reserved=623067KB, committed=127703KB)
(thread #1116)
(stack: reserved=619776KB, committed=124412KB)
(malloc=1986KB #6710)
(arena=1306KB #2229)
- Code (reserved=551264KB, committed=309320KB)
(malloc=22872KB #85890)
(mmap: reserved=528392KB, committed=286448KB)
- GC (reserved=255100KB, committed=255100KB)
(malloc=66280KB #217377)
(mmap: reserved=188820KB, committed=188820KB)
- Compiler (reserved=5991KB, committed=5991KB)
(malloc=5827KB #11052)
(arena=165KB #5)
- Internal (reserved=9531KB, committed=9531KB)
(malloc=9495KB #115652)
(mmap: reserved=36KB, committed=36KB)
- Other (reserved=623912KB, committed=623912KB)
(malloc=623912KB #1748)
- Symbol (reserved=80580KB, committed=80580KB)
(malloc=78334KB #2013599)
(arena=2246KB #1)
- Native Memory Tracking (reserved=47255KB, committed=47255KB)
(malloc=798KB #11382)
(tracking overhead=46457KB)
- Shared class space (reserved=16384KB, committed=10620KB)
(mmap: reserved=16384KB, committed=10620KB)
- Arena Chunk (reserved=3792KB, committed=3792KB)
(malloc=3792KB)
- Module (reserved=14765KB, committed=14765KB)
(malloc=14765KB #47074)
- Safepoint (reserved=8KB, committed=8KB)
(mmap: reserved=8KB, committed=8KB)
- Synchronization (reserved=1859KB, committed=1859KB)
(malloc=1859KB #17055)
- Serviceability (reserved=1KB, committed=1KB)
(malloc=1KB #12)
- Metaspace (reserved=399515KB, committed=396891KB)
(malloc=6299KB #8152)
(mmap: reserved=393216KB, committed=390592KB)
- String Deduplication (reserved=18561KB, committed=18561KB)
(malloc=18561KB #139283)
- Object Monitors (reserved=170KB, committed=170KB)
(malloc=170KB #838)
< /code>
Это использование памяти продолжает увеличиваться со временем, даже если нагрузка уменьшается через некоторое время. Я подозреваю утечку памяти. Итак, я исследовал JCMD, но я не могу определить, что вызывает это увеличение использования памяти.>
Подробнее здесь: https://stackoverflow.com/questions/797 ... pplication
Мобильная версия