forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unnecessary locks (apache#8207)
### Motivation There are many unnecessary locks in MultiTopicsConsumerImpl, which affect performance. BlockingQueue is inherently thread-safe, and there is no need to lock in many places. ### Modifications Remove unnecessary locks ### Verifying this change Use the perf tool, 3 * 8-core 16G nodes,recording time is about 2 minutes 1. Prepare a 3-node pulsar cluster and produce some data(topic with 4 partitions) 2. Use pulsar-perf on another machine, 3. `bin/pulsar-perf consume -u 'http://x.x.x.x:8080' -s my-sub-6 -sp Earliest -q 100000 persistent://public/default/p-topic` Pressure test twice, the first time with the original one, and the second time to replace the pulsar-client-original.jar in the lib folder before removing: Aggregated throughput stats --- 11715556 records received --- 68813.420 msg/s --- 537.605 Mbit/s after removing: Aggregated throughput stats --- 25062077 records received --- 161656.814 msg/s --- 1262.944 Mbit/s
- Loading branch information
1 parent
a662470
commit 2f8e042
Showing
2 changed files
with
55 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters