-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[improve][broker] Implement PIP-430 Pulsar Broker cache improvements #24623
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
Conversation
…dCount to broker.conf
|
Here's the JMH results for the latest changes. The new Here's a visualization of the results: One interesting detail is that ActiveManagedCursorContainerImpl's algorithm would be faster than ManagedCursorContainer's algorithm for tracking the slowest cursor, assuming that most cursors are moving forward (which is the case). |
|
The recently added "experimental" test case The with PIP-430 defaults, Cache hits 98.56%, Cache misses 1.44% : with with The results vary quite a lot and these are values from single runs. However, it demonstrates a significant improvement in reducing the amount of cache misses in rolling restarts when PIP-430 defaults are used. |
|
Test logging was slightly impacting the results (I noticed it with async-profiler) and I made changes to configure Log4J logging in tests so that it can be diverted to file based logging instead of default console logging. The results are very similar on Dell XPS 2019 i9-9980HK (on Linux):
detailed:
|
|
This test is flaky, will need to address it. |
|
I also ran the test run on GCP on e2-highcpu-8 VM. The base VM setup was done using these instructions.
|
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedgerFactory.java
Outdated
Show resolved
Hide resolved
...ed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ActiveManagedCursorContainer.java
Outdated
Show resolved
Hide resolved
...ed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ActiveManagedCursorContainer.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorContainerImpl.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorContainerImpl.java
Outdated
Show resolved
Hide resolved
...ain/java/org/apache/bookkeeper/mledger/impl/cache/RangeEntryCacheManagerEvictionHandler.java
Show resolved
Hide resolved
…esMillis to conf files and PIP doc
merlimat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The improvements looks super-impressive! Having the micro-benchmarks make a great case.
Only minor comments
...ed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/cache/RangeCacheEntryWrapper.java
Outdated
Show resolved
Hide resolved
...ed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/cache/RangeCacheEntryWrapper.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionPool.java
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ReferenceCountedEntry.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/EntryReadCountHandlerImpl.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/EntryReadCountHandlerImpl.java
Outdated
Show resolved
Hide resolved
...edger/src/main/java/org/apache/bookkeeper/mledger/impl/ActiveManagedCursorContainerImpl.java
Show resolved
Hide resolved
|
While doing some validation, I noticed that Pulsar has a long time issue that consumers aren't able to keep with producers even when there are available resources unless I created #24695 about this. |
Fixes #16421
Fixes #24656
Motivation
This is the 2nd implementation PR for "PIP-430: Pulsar Broker cache improvements: refactoring eviction and adding a new cache strategy based on expected read count"
Modifications
Documentation
docdoc-requireddoc-not-neededdoc-complete