sofastack / sofa-registry

SOFARegistry is a production-level, low-latency, high-availability service registry powered by Ant Financial.
https://www.sofastack.tech/sofa-registry/docs/Home
Apache License 2.0
653 stars 247 forks source link

Informer 导致fgc #225

Closed dzdx closed 2 years ago

dzdx commented 2 years ago

Describe the bug

Informer上的container由于采用半小时重建一次替换的方式进行更新,所以旧的对象会进入old区,导致old区一直升高引起fgc image

image

需要对这部分内存占用进行优化

Expected behavior

Actual behavior

Steps to reproduce

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

NickNYU commented 2 years ago

可以尝试依赖off heap的:https://github.com/cfelde/BinaryOffheapHashMap#:~:text=The%20BOHMap%20is%20a%20hashmap,entries%20stored%20in%20the%20map.

也可以自己实现: https://blogs.oracle.com/javamagazine/post/creating-a-java-off-heap-in-memory-database