bifromqio / bifromq

A Multi-Tenancy MQTT broker adopting Serverless architecture
https://bifromq.io
Apache License 2.0
619 stars 61 forks source link

bifromq 性能测试系统可能阻塞在DistWorkerCoProcFactory的 ForkJoinPool #81

Closed masterOcean closed 5 months ago

masterOcean commented 5 months ago

bifromq 性能测试可能阻塞点 3台节点组成 bifromq 集群,连接了 4w client,每个 client 发送 4k 的 body, 集群的 direct memory 很快就满了然后集群就宕机了。我们抓了正常压测下的集群 bootstrap 节点的 off-cpu 火焰图(arthas 抓取 event type 为 lock 的火焰图),发现可能的阻塞点可能在DistWorkerCoProcFactory的 ForkJoinPool ,98%的时间是在 ForkJoinPool 上。 image Netty 网络收发只占了 2% 时间不到

BifroMQ

popduke commented 5 months ago
  1. lock event sampling并不能说明是阻塞,caffeine cache默认用FJP执行cache cleanup task,BifroMQ多处使用了cache,对锁的使用占了sample的大部分很正常。
  2. 压测环境是什么?cpu,内存,网卡,bifromq的启动参数, etc
  3. 压测参数是什么?频率,qos,cleansession,topic,topic filter,etc