question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I 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:open
  • Created 2 months ago
  • Comments:30

github_iconTop GitHub Comments

1reaction
Lanayxcommented, Jul 24, 2023

@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)

1reaction
Lanayxcommented, Jul 23, 2023

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 using SendAsync in .net client without awaiting just hangs when doing final await, I need to understand why this happens. However with await producer.SendAndForgetAsync everything works as expected.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found