Slow performance
See original GitHub issueI have been testing this client. I made couple of performance tests but the result were too low. I am not sure if I am doing something wrong but here is the configuration.
I deployed pulsar to kubernetes. With it is comes with toolset which has pulsar-perf tool. When I run the command:
bin/pulsar-perf produce --batch-max-messages 1000 -c 1 -r 200000 -s 750 non-persistent://test/test/test
-c
is for tcp connection, -s
is for size, -r
is for rate
The default number of threads is 1
I get around 200k messages per second.
Now, I implemented a simple dotnet worker to see the results here is the code:
var client = await new PulsarClientBuilder()
.ServiceUrl("pulsar://pulsar-broker.pulsar:6650")
.BuildAsync();
var producer = await client
.NewProducer()
.Topic("non-persistent://test/test/test")
.CreateAsync();
byte[] buffer = new byte[750];
Random.Shared.NextBytes(buffer);
while (true)
{
await producer.SendAndForgetAsync(buffer);
}
With this code I get around 15k messages per second.
I would expect the number to be close but they are far from each what could be the reason?
Issue Analytics
- State:
- Created 2 months ago
- Comments:30
Top Results From Across the Web
My Computer is Running Slow, What Steps Can I Do to Fix It?
Make sure your computer and processor is not overheating. Excessive heat can cause a decrease in the computer's performance because most ...
Read more >Why Is My Computer So Slow? Tips to Speed It Up
If your PC has been working fine but suddenly has become slow, here are a few common causes: You're running a new app...
Read more >PC running slow? Here's how to speed things up
Well, technically on your own -- I'll walk you through how to fix your computer's sluggish performance by digging into Task Manager, controlling ......
Read more >Why your PC is so slow... and how you can speed it up
A slow computer is often caused by too many programs running simultaneously, taking up processing power and reducing the PC's performance. Some ...
Read more >If your Mac runs slowly
If you find your Mac is running slowly, there are a number of potential causes that you can check. Your computer's startup disk...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@aeb-dev I’ve recently published a fix for the issue above, now SendAsync in load test won’t lead to the program hang ( actually it was not hanging, but batching stopped working properly)
You can try yourself, by adding a consumer and verifying delivered messages count and timing. I’ve just run another local test with
maxPendingMessages(100000)
and now .net and java clients show the same time of 8200ms locally. The only issue I see is that it seems that with default queue side and usingSendAsync
in .net client without awaiting just hangs when doing final await, I need to understand why this happens. However withawait producer.SendAndForgetAsync
everything works as expected.