-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ThreadPoolExecutor instead of EventLoop #8208
Conversation
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java
Outdated
Show resolved
Hide resolved
Is there any other ConsumerXX class that needs this change ? |
If this PR is accepted, I will continue to modify other ConsumerXX :) |
@315157973 how did you do the test? We'd prefer you to attach the details on how you run the perf test. This would give the context for the reviewers to review this change. |
@315157973 can you provide more details on the setup you used to get theses perf numbers. |
Hello, I have already replied in another pr, refer to #8207 |
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java
Outdated
Show resolved
Hide resolved
…arClientImpl.java Co-authored-by: lipenghui <penghui@apache.org>
/pulsarbot run-failure-checks |
@315157973 Please fix the conflicts. |
/pulsarbot run-failure-checks |
### Motivation When Netty's `EventLoop` receives a new task,it will call `eventFdWrite`, and then trigger system calls, such as: system_call_fastpath, eventfd_write After we replaced EventLoop with a native jdk thread pool, the performance improved ### Modifications Use ThreadPoolExecutor instead of EventLoop ### Verifying this change We use pulsar perf for testing before: Aggregated throughput stats --- 11715556 records received --- 68813.420 msg/s --- 537.605 Mbit/s after: Aggregated throughput stats --- 18392800 records received --- 133314.602 msg/s --- 1041.520 Mbit/s (cherry picked from commit 3a298f3)
### Motivation When Netty's `EventLoop` receives a new task,it will call `eventFdWrite`, and then trigger system calls, such as: system_call_fastpath, eventfd_write After we replaced EventLoop with a native jdk thread pool, the performance improved ### Modifications Use ThreadPoolExecutor instead of EventLoop ### Verifying this change We use pulsar perf for testing before: Aggregated throughput stats --- 11715556 records received --- 68813.420 msg/s --- 537.605 Mbit/s after: Aggregated throughput stats --- 18392800 records received --- 133314.602 msg/s --- 1041.520 Mbit/s
### Motivation When Netty's `EventLoop` receives a new task,it will call `eventFdWrite`, and then trigger system calls, such as: system_call_fastpath, eventfd_write After we replaced EventLoop with a native jdk thread pool, the performance improved ### Modifications Use ThreadPoolExecutor instead of EventLoop ### Verifying this change We use pulsar perf for testing before: Aggregated throughput stats --- 11715556 records received --- 68813.420 msg/s --- 537.605 Mbit/s after: Aggregated throughput stats --- 18392800 records received --- 133314.602 msg/s --- 1041.520 Mbit/s
Motivation
When Netty's
EventLoop
receives a new task,it will calleventFdWrite
, and then trigger system calls, such as: system_call_fastpath, eventfd_writeAfter we replaced EventLoop with a native jdk thread pool, the performance improved
Modifications
Use ThreadPoolExecutor instead of EventLoop
Verifying this change
We use pulsar perf for testing
before:
Aggregated throughput stats --- 11715556 records received --- 68813.420 msg/s --- 537.605 Mbit/s
after:
Aggregated throughput stats --- 18392800 records received --- 133314.602 msg/s --- 1041.520 Mbit/s