JAVA 进程使用物理内存超过预期(JDK8+G1)?
由于字数限制,以下作为补充:打开 native memory tracking 功能:Total: reserved=123984870KB, committed=123546182KB- Java Heap (reserved=111149056KB, committed=111149056KB) (mmap: reserved=111149056KB, committed=111149056KB) - Class (reserved=41742KB, committed=40426KB) (classes #5637) (malloc=782KB #10888) (mmap: reserved=40960KB, committed=39644KB) - Thread (reserved=386800KB, committed=386800KB) (thread #376) (stack: reserved=385500KB, committed=385500KB) (malloc=477KB #1903) (arena=823KB #750)- Code (reserved=254976KB, committed=34692KB) (malloc=5376KB #8553) (mmap: reserved=249600KB, committed=29316KB) - GC (reserved=4669338KB, committed=4669338KB) (malloc=511898KB #957771) (mmap: reserved=4157440KB, committed=4157440KB) - Compiler (reserved=404KB, committed=404KB) (malloc=274KB #416) (arena=131KB #3)- Internal (reserved=7226182KB, committed=7226182KB) (malloc=7226150KB #855995) (mmap: reserved=32KB, committed=32KB) - Symbol (reserved=9063KB, committed=9063KB) (malloc=7265KB #65080) (arena=1798KB #1)- Native Memory Tracking (reserved=29993KB, committed=29993KB) (malloc=229KB #3465) (tracking overhead=29764KB)- Arena Chunk (reserved=227KB, committed=227KB) (malloc=227KB) - Unknown (reserved=217088KB, committed=0KB) (mmap: reserved=217088KB, committed=0KB) 可以看到 GC 和 Internal 各自占用4G和7G, 不在JMX 中 non-heap memory 和 buffer pool之列.在将MALLOC_ARENA_MAX=4设置成MALLOC_ARENA_MAX=1后,Internal 接近3G(-4G),- Internal (reserved=3039556KB, committed=3039556KB) (malloc=3039524KB #330390) (mmap: reserved=32KB, committed=32KB) 打印 detail 信息,其中 G1 申请了两块1.65G 左右的内存: reserved 1736704KB for GC from ReservedSpace::initialize(unsigned long, unsigned long, bool, char*, unsigned long, bool)+0x256 ReservedSpace::ReservedSpace(unsigned long, unsigned long)+0x6a G1CollectedHeap::initialize()+0x4f5 Universe::initialize_heap()+0xf3 committed 1736704KB from G1PageBasedVirtualSpace::commit_internal(unsigned long, unsigned long)+0xbf G1PageBasedVirtualSpace::commit(unsigned long, unsigned long)+0x11c G1RegionsLargerThanCommitSizeMapper::commit_regions(unsigned int, unsigned long)+0x40 HeapRegionManager::commit_regions(unsigned int, unsigned long)+0x97 reserved 1736704KB for GC from ReservedSpace::initialize(unsigned long, unsigned long, bool, char*, unsigned long, bool)+0x256 ReservedSpace::ReservedSpace(unsigned long, unsigned long)+0x6a G1CollectedHeap::initialize()+0x475 Universe::initialize_heap()+0xf3 committed 1736704KB from G1PageBasedVirtualSpace::commit_internal(unsigned long, unsigned long)+0xbf G1PageBasedVirtualSpace::commit(unsigned long, unsigned long)+0x11c G1RegionsLargerThanCommitSizeMapper::commit_regions(unsigned int, unsigned long)+0x40 HeapRegionManager::commit_regions(unsigned int, unsigned long)+0x87------------------ ReservedSpace::initialize(unsigned long, unsigned long, bool, char*, unsigned long, bool)+0x256 ReservedSpace::ReservedSpace(unsigned long, unsigned long)+0x6a G1CollectedHeap::initialize()+0x475 Universe::initialize_heap()+0xf3 (reserved=1736704KB, committed=1736704KB) ReservedSpace::initialize(unsigned long, unsigned long, bool, char*, unsigned long, bool)+0x256 ReservedSpace::ReservedSpace(unsigned long, unsigned long)+0x6a G1CollectedHeap::initialize()+0x4f5 Universe::initialize_heap()+0xf3 (reserved=1736704KB, committed=1736704KB)
推荐阅读
- 『先进』长江流域最先进洗舱站在宁投运 油可分离回收,水能循环使用
- 汽车|冬天怎样让车内温度快速升高?座椅加热的最佳使用方式二,外循环的作用总结
- 汽车|迈凯伦Artura不再使用迈凯伦祖传V8引擎了?
- dart这编程语言现在发展怎么样了,语法与Java,c#很相似,甚至更简洁
- python的html5lib这个库咋使用啊我在网上也没有找到相关文档
- win7中本地连接跟无线网卡同时使用时是怎么样的模式
- 可不可能利用网盘的秒传功能使用伪造的MD5(或其他信息)值进行文件分享
- Java工程师和C++工程师在工作上有啥区别哪个更适合自身发展
- 为啥很多企业给用户发邮件会使用noreply/no-reply@xx.xx的邮箱
- win10激活的问题
