arthas内存占用问题
- [x] 我已经在 issues 里搜索,没有重复的issue。
环境信息
arthas-boot.jar或者as.sh的版本: 3.5.0- Arthas 版本: 3.5.0
- 操作系统版本: xxx
- 目标进程的JVM版本: jdk8
- 执行
arthas-boot的版本: xxx
重现问题的步骤
使用arthas tunnel,应用使用arthas-spring-boot-starter 3.5.0
应用内存只有512m,比较吃紧,发现使用atthas后发现内存占用升高,一直gc,dump后发现PoolChunk占用约100M了,且不会回收。 哪个版本有优化这个问题吗?减少内存占用。
期望的结果
What do you expected from the above steps?
实际运行的结果
实际运行结果,最好有详细的日志,异常栈。尽量贴文本。
把异常信息贴到这里
com.alibaba.arthas.deps.io.netty.buffer.PoolChunk This indicates that Netty's pooled memory allocation is consuming a large amount of memory. Arthas uses Netty internally, and Netty employs a pooled byte buffer allocator (PooledByteBufAllocator). Large retained byte arrays (byte[16.8MB]) suggest pooled direct memory chunks are being held and not released. Netty ByteBuf Not Released Some Netty ByteBuf instances may not be released properly, leading to memory leaks. Are you frequently using ByteBuf without calling release()? If so, this could be the reason. Solution Force Garbage Collection & Release Memory vmtool --action forceGc Alternatively, set a maximum cache limit: System.setProperty("io.netty.allocator.maxOrder", "3"); // Reduce memory consumption