pulsar-client-go icon indicating copy to clipboard operation
pulsar-client-go copied to clipboard

High cpu pres

Open cyjaysong opened this issue 3 years ago • 3 comments

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 avatar Nov 17 '21 01:11 cyjaysong

Can you tell me which client version you used?

EAHITechnology avatar Dec 29 '21 12:12 EAHITechnology

Can you tell me which client version you used?

v0.7.0

cyjaysong avatar Dec 29 '21 14:12 cyjaysong

@EAHITechnology Have you noticed this problem?

cyjaysong avatar Dec 31 '21 01:12 cyjaysong