<@U078Y59KC3B> I ran the command pulsar-perf which...
# ask-ai
m
@RunLLM I ran the command pulsar-perf which gave output
Aggregated throughput stats --- 1000065 records sent --- 9047.454 msg/s --- 70.683 Mbit/s
but when i checked the messageInCount it is showing 2million messages instead of 1million why this happened? and how can I avoid it?
r
The likely cause is that you used
pulsar-perf produce
with multiple test threads, but the tool exits all threads as soon as any one thread finishes its assigned messages, potentially causing more messages to be sent than requested. This is a known issue: the total number of messages produced can be less than or greater than the specified count due to how threads are managed in
pulsar-perf
(see explanation). To avoid this, ensure that the number of messages divides evenly by the number of test threads, or use a single thread. Would you like more detail on how to configure
pulsar-perf
to match your expected message count? Sources: - GitHub Issue: PerformanceProducer do not produce expected number of messages 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
m
@RunLLM i ran command
Copy code
bin/pulsar-perf produce \
  --num-messages 1000000 \
  --rate 10000 \
  <persistent://public/default/org-perf>
r
If you ran
bin/pulsar-perf produce --num-messages 1000000 --rate 10000 <persistent://public/default/org-perf>
, but see more than 1 million messages in the topic, it's likely due to how
pulsar-perf
handles threading: if you use multiple test threads (the default is 1), the total messages sent can exceed the specified count because threads may not coordinate perfectly (see details). To avoid this, set
--num-test-threads 1
or ensure
--num-messages
is divisible by the number of threads. Would you like a step-by-step example or more on how to control message count? Sources: - see details 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.