Java 源码剖析——彻底搞懂Reference 和ReferenceQueueap,则采用判断get()是否为null来作处理。 接下来是它的主要成员: private T referent; /* Treated specially by GC */ 在这里我们首先明确一些名词,Reference类也被称为引用类,它的实例 Reference Instance就是引 实例,但是由于它是一个抽象类,它的实例只能是子类软(soft)引用,弱(weak)引用 被处理的引用实例,我们在注释中看到的四个状态,是引用 例的内部状态,不可以被外部查看或是直接修改: ● Active:新创建的引用实例处于Active状态,但当GC检测到该实例引用的实际对象的可达性发生某 适当的改变(实际对象对于GC roots不可达)后,它的状态将会根据此实例是否注册在引用队列中而变 Pending或是Inactive。 ● Pending:当引用实例被放置在pending-Reference 注册在一个引用队列中,该实例将永远不会进入Enqueued状态。 ● Inactive:一旦某个引用实例处于Inactive状态,它的状态将不再会发生改变,同时说明该引用实例 指向的实际对象一定会被GC所回收。 事实上Reference类并没有显示地定义内部状态值,JVM仅需要通过成员queue和next的值就可以判 当前引用实例处于哪个状态: ● Active:queue为创建引用实例时传入0 码力 | 6 页 | 283.24 KB | 1 年前3
Nacos架构&原理
模块各自的推送通道都是按照自己的设计模型来实现的。 产品 推送模型 数据⼀致性 痛点 说明 Nacos Config 异步 Servlet 基于 MD5 比 对⼀致性 http 短连接,30 秒定 期创建销毁连接,GC 压力大 md5 值计算也有⼀定 开销,在可接受范围内 Nacos Naming HTTP/UDP UDP 推送 + 补偿查询 丢包,云架构下无法 反向推送 配置和服务器模块的数据推送通道不统⼀,http ext.dirs=${JAVA_HOME}/jre/lib/ext:${JAVA _HOME}/lib/ext -Xloggc:/home/admin/nacos/logs/nacos_gc.log -verbose:gc -XX:+PrintGCDetai ls -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation 126 测试服务端在频繁发布/上下线场景下的系统指标和推送情况。持续进行 30min。 测试数据 1. 大规模服务注册后达到稳定状态 版本 压力规模 机器数*线程 阶段 CPU LOAD GC 推送失败率 实际服务数/ 实例数 2.0.0- BETA 200 * 500 (10w 客户端, 50w 服务实例) 注册 23%~30% 3~5 无 FGC 单台服务端 (4982/62112)0 码力 | 326 页 | 12.83 MB | 9 月前3
一次线上java 应用响应时间过长问题的排查这,这,这不科学。垃圾回收
看垃圾回收日志,发现一直在进行 Full GC,但是几乎没啥效果,GC 完了,老年代依然是几乎 满的状态。
即使是 CMS,也不能避免传说中的 stop the world,所以响应时间变长了。
但是,现在问题来了,Full GC 回收不掉的对象都是啥啥啥?分析 java 堆内存
0 码力 | 3 页 | 247.74 KB | 1 年前3
ActiveMQ Artemis 2.27.1 Documentationto update diverts Ability to "disable" a queue so that messages are not routed to it Support JVM GC & thread metrics Support for resetting queue properties by unsetting them in broker.xml Undeploy count metrics from all queues to get the total). JVM memory metrics are also exported by default and GC, thread metrics, and Netty metrics can be configured Configuration Metrics for all addresses and JVM metrics:true gc>true gc>true 0 码力 | 414 页 | 6.20 MB | 1 年前3
Apache ActiveMQ Artemis 2.30.0 User Manualdiverts Versions 19 Ability to "disable" a queue so that messages are not routed to it Support JVM GC & thread metrics Support for resetting queue properties by unsetting them in broker.xml Undeploy queues to get the total). Optional metrics include: JVM memory metrics (exported by default) JVM GC JVM thread Netty File descriptors Processor Uptime Configuration Metrics for all addresses andtrue gc>true gc>true 0 码力 | 500 页 | 6.37 MB | 1 年前3
Apache ActiveMQ Artemis 2.26.0 User Manualto update diverts Ability to "disable" a queue so that messages are not routed to it Support JVM GC & thread metrics Support for resetting queue properties by unsetting them in broker.xml Undeploy count metrics from all queues to get the total). JVM memory metrics are also exported by default and GC, thread metrics, and Netty metrics can be configured Configuration Metrics for all addresses andtrue gc>true gc>true 0 码力 | 487 页 | 6.28 MB | 1 年前3
Apache ActiveMQ Artemis 2.28.0 User Manualto update diverts Ability to "disable" a queue so that messages are not routed to it Support JVM GC & thread metrics Support for resetting queue properties by unsetting them in broker.xml Undeploy count metrics from all queues to get the total). JVM memory metrics are also exported by default and GC, thread metrics, and Netty metrics can be configured Configuration Metrics for all addresses andtrue gc>true gc>true 0 码力 | 494 页 | 6.33 MB | 1 年前3
Apache ActiveMQ Artemis 2.22.0 User Manualto update diverts Ability to "disable" a queue so that messages are not routed to it Support JVM GC & thread metrics Support for resetting queue properties by unsetting them in broker.xml Undeploy count metrics from all queues to get the total). JVM memory metrics are also exported by default and GC, thread metrics, and Netty metrics can be configured Configuration Metrics for all addresses andtrue gc>true gc>true 0 码力 | 502 页 | 6.34 MB | 1 年前3
Apache ActiveMQ Artemis 2.29.0 User Manualto update diverts Ability to "disable" a queue so that messages are not routed to it Support JVM GC & thread metrics Support for resetting queue properties by unsetting them in broker.xml Versions queues to get the total). Optional metrics include: JVM memory metrics (exported by default) JVM GC JVM thread Netty File descriptors Processor Uptime Configuration Metrics for all addresses andtrue gc>true gc>true 0 码力 | 499 页 | 6.37 MB | 1 年前3
Apache ActiveMQ Artemis 2.21.0 User Manualto update diverts Ability to "disable" a queue so that messages are not routed to it Support JVM GC & thread metrics Support for resetting queue properties by unsetting them in broker.xml Undeploy count metrics from all queues to get the total). JVM memory metrics are also exported by default and GC, thread metrics, and Netty metrics can be configured Configuration Metrics for all addresses andtrue gc>true gc>true 0 码力 | 503 页 | 6.34 MB | 1 年前3
共 134 条
- 1
- 2
- 3
- 4
- 5
- 6
- 14













