streamnative / pulsar-client-go

Apache Pulsar Go Client Library
https://pulsar.apache.org/
Apache License 2.0
1 stars 2 forks source link

ISSUE-668: High cpu pres #243

Open sijie opened 3 years ago

sijie commented 3 years ago

Original Issue: apache/pulsar-client-go#668


Expected behavior

The load of the cpu is less affected by the number of topic partitions

Actual behavior

I have a project deployed on a server, The RocketMQ (also deployed on this server) was used as a message queue. During the peak of the business, the CPU usage of the server was only 12%. When I After replacing the message queue with Tencent's TDMQ-Pulsar service, the CPU usage of my service became very high. In the past, each topic on RocketMQ I built by myself had 16 partitions, while each topic of TDMQ-Pulsar only had 4 partitions, but the CPU usage is still 4 times the previous. Even if I adjust the number of partitions for each topic to 1, the CPU usage still exceeds that of the RocketMQ version. pprof concluded that runtime.netpoll occupies too much CPU.

Steps to reproduce

Create a topic, set the number of partitions to 1, use producers and consumers to connect to it in the service, view and record the CPU usage. Increase the number of partitions of the topic, connect to it again, check the CPU usage and compare with the previous results.

System configuration

Pulsar version: 2.7

cyjaysong commented 1 year ago

I haven't made any comparisons recently, I'm not sure if there have been any improvements。 Also, is there an Alibaba Cloud cluster available for 'StreamNative'? We are planning to use StreamNativeCloud