Myasuka commented on a change in pull request #2822:
URL: https://github.com/apache/bookkeeper/pull/2822#discussion_r728599774



##########
File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/KeyValueStorageRocksDB.java
##########
@@ -149,8 +149,12 @@ public KeyValueStorageRocksDB(String basePath, String 
subPath, DbConfigType dbCo
                     tableOptions.setFilterPolicy(new 
BloomFilter(bloomFilterBitsPerKey, false));
                 }
 
-                // Options best suited for HDDs
+                // Cache index & filter in block cache to limit the memory 
usage
                 tableOptions.setCacheIndexAndFilterBlocks(true);
+                // Options below are tune to mitigate the performance 
regression when limiting the memory usage
+                
tableOptions.setCacheIndexAndFilterBlocksWithHighPriority(true);

Review comment:
       I think you could refer to 
[rocksdb-wiki-cache-blocks](https://github.com/facebook/rocksdb/wiki/Block-Cache#caching-index-filter-and-compression-dictionary-blocks)
 to get some background information of `setCacheIndexAndFilterBlocks`. If this 
option is set as `false`, table reader would always keep the index & filter 
block in memory instead of limiting them in a LRU cache. 
   You could also refer to 
[rocksdb-wiki-cache-blocks](https://github.com/facebook/rocksdb/wiki/Block-Cache#caching-index-filter-and-compression-dictionary-blocks)
 to see the suggestion to combine these options together.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to