-
Notifications
You must be signed in to change notification settings - Fork 903
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
Set default sizes of DbLedgerStorage read and write cache to be proportional to JVM direct memory #1813
Conversation
…rtional to JVM direct memory
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.
Should be change this default config file and explain how the value is calculated ?
Overall the change is good, just a few nits
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/DbLedgerStorage.java
Show resolved
Hide resolved
@@ -24,6 +24,10 @@ | |||
|
|||
import com.google.common.primitives.UnsignedBytes; | |||
|
|||
//CHECKSTYLE.OFF: IllegalImport |
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.
This comment can be removed as well
Mmm What do you think? |
I have no idea why it was blacklisted. I guess In my opinion, the override here is fine. We should only using things from |
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.
Good
#shipit
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/DbLedgerStorage.java
Show resolved
Hide resolved
the reason why it is in blacklist is internal classes are not encouraged to use in general, if there are exceptions, those imports should be highlighted with these |
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.
@merlimat : as we talked offline, I would like to have some simple validation in the server configuration, if the total memory size configured to be used for db ledger storage exceed the jvm memory, we should fail startup with an explicit logging.
@sijie Updated |
run integration tests |
Motivation
To simplify Bookie configuration when using
DbLedgerStorage
, set the memory size defaults for WriteCache, ReadCache and RocksDB block cache to be pegged to the available direct memory configured in the JVM.User can always configure specific values and override this behavior.