Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Fetch: do not decode data in critical BookKeeper OrderedExecutor thread#1116

Merged
BewareMyPower merged 1 commit intostreamnative:masterfrom
eolivelli:impl/kop-decode-no-bk-thread
Feb 25, 2022
Merged

Fetch: do not decode data in critical BookKeeper OrderedExecutor thread#1116
BewareMyPower merged 1 commit intostreamnative:masterfrom
eolivelli:impl/kop-decode-no-bk-thread

Conversation

@eolivelli
Copy link
Contributor

Motivation
During OMB testing @dave2wave noticed that the BookKeeperClientScheduler-OrderedScheduler-X-Y thread pool is busy in doing decoding work (from Pulsar -> Kafka) and this is something that may limit the efficiency of the system because that threadpool handles all the BookKeeper activities.

Modifications
With this patch we are performing the "decoding" from Pulsar -> Kafka (con the consumer code path) in a threadpool that is not the BookKeeper Ordered Executor pool (BookKeeperClientScheduler-OrderedScheduler-X-Y).

Results
With this patch @dave2wave reported far better performances using OMB:

the test results show the BookKeeperClientWorker-OrderedExecutor is working much less than before. It is about 40-45% cpu in our OMB tests now. The equivalent Pulsar workload is about 20% cpu. Before this fix the process blocked at 95-100%

with this patch we are able to push OMB to 1 million messages/second even with entryFormat:pulsar, before this patch this was possible in that env only with entryFormat:kafka

@wenbingshen
Copy link
Contributor

wenbingshen commented Feb 25, 2022

Good work! BookKeeperClientScheduler-OrderedScheduler-X-Y thread pool, I've seen a similar busy situation in our pulsar cluster when hot events occur, as it handles all Bookkeeper operations, including all read and write requests.

@BewareMyPower BewareMyPower merged commit 51563fe into streamnative:master Feb 25, 2022
BewareMyPower pushed a commit that referenced this pull request Feb 25, 2022
…ad (#1116)

**Motivation**
During OMB testing @dave2wave noticed that the BookKeeperClientScheduler-OrderedScheduler-X-Y thread pool is busy in doing decoding work (from Pulsar -> Kafka) and this is something that may limit the efficiency of the system because that threadpool handles all the BookKeeper activities.

**Modifications**
With this patch we are performing the "decoding" from Pulsar -> Kafka (con the consumer code path) in a threadpool that is not the BookKeeper Ordered Executor pool (BookKeeperClientScheduler-OrderedScheduler-X-Y).

**Results**
With this patch @dave2wave reported far better performances using OMB:
> the test results show the BookKeeperClientWorker-OrderedExecutor is working much less than before. It is about 40-45% cpu in our OMB tests now. The equivalent Pulsar workload is about 20% cpu. Before this fix the process blocked at 95-100%

with this patch we are able to push OMB to 1 million messages/second even with `entryFormat:pulsar`, before this patch this was possible in that env only with `entryFormat:kafka`

(cherry picked from commit 51563fe)
BewareMyPower pushed a commit that referenced this pull request Feb 25, 2022
…ad (#1116)

**Motivation**
During OMB testing @dave2wave noticed that the BookKeeperClientScheduler-OrderedScheduler-X-Y thread pool is busy in doing decoding work (from Pulsar -> Kafka) and this is something that may limit the efficiency of the system because that threadpool handles all the BookKeeper activities.

**Modifications**
With this patch we are performing the "decoding" from Pulsar -> Kafka (con the consumer code path) in a threadpool that is not the BookKeeper Ordered Executor pool (BookKeeperClientScheduler-OrderedScheduler-X-Y).

**Results**
With this patch @dave2wave reported far better performances using OMB:
> the test results show the BookKeeperClientWorker-OrderedExecutor is working much less than before. It is about 40-45% cpu in our OMB tests now. The equivalent Pulsar workload is about 20% cpu. Before this fix the process blocked at 95-100%

with this patch we are able to push OMB to 1 million messages/second even with `entryFormat:pulsar`, before this patch this was possible in that env only with `entryFormat:kafka`

(cherry picked from commit 51563fe)
BewareMyPower pushed a commit that referenced this pull request Feb 25, 2022
…ad (#1116)

**Motivation**
During OMB testing @dave2wave noticed that the BookKeeperClientScheduler-OrderedScheduler-X-Y thread pool is busy in doing decoding work (from Pulsar -> Kafka) and this is something that may limit the efficiency of the system because that threadpool handles all the BookKeeper activities.

**Modifications**
With this patch we are performing the "decoding" from Pulsar -> Kafka (con the consumer code path) in a threadpool that is not the BookKeeper Ordered Executor pool (BookKeeperClientScheduler-OrderedScheduler-X-Y).

**Results**
With this patch @dave2wave reported far better performances using OMB:
> the test results show the BookKeeperClientWorker-OrderedExecutor is working much less than before. It is about 40-45% cpu in our OMB tests now. The equivalent Pulsar workload is about 20% cpu. Before this fix the process blocked at 95-100%

with this patch we are able to push OMB to 1 million messages/second even with `entryFormat:pulsar`, before this patch this was possible in that env only with `entryFormat:kafka`

(cherry picked from commit 51563fe)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants