diff --git a/source/deployment/deployment-peer/src/main/resources/config/init/rocksdb.config b/source/deployment/deployment-peer/src/main/resources/config/init/rocksdb.config index 726591be..210c20a8 100644 --- a/source/deployment/deployment-peer/src/main/resources/config/init/rocksdb.config +++ b/source/deployment/deployment-peer/src/main/resources/config/init/rocksdb.config @@ -1,8 +1,8 @@ #BlockCache使用缓存大小,单位:字节 -cache.capacity=536870912 +cache.capacity=1073741824 #BlockCache分片大小 -cache.numShardBits=64 +cache.numShardBits=128 #BlockSize大小,单位:字节 table.blockSize=4096 @@ -10,8 +10,8 @@ table.blockSize=4096 #MetaDataBlockSize大小,单位:字节 table.metadata.blockSize=8192 -#布隆过滤器前缀bit数量 -table.bloom.bitsPerKey=16 +#布隆过滤器前缀bit数量,小于0的情况下不打开布隆过滤器 +table.bloom.bitsPerKey=-1 #每个MemTable使用内存大小,单位:字节 option.writeBufferSize=268435456 diff --git a/source/storage/storage-rocksdb/src/main/java/com/jd/blockchain/storage/service/impl/rocksdb/RocksDBConnectionFactory.java b/source/storage/storage-rocksdb/src/main/java/com/jd/blockchain/storage/service/impl/rocksdb/RocksDBConnectionFactory.java index 427ab433..22b51e30 100644 --- a/source/storage/storage-rocksdb/src/main/java/com/jd/blockchain/storage/service/impl/rocksdb/RocksDBConnectionFactory.java +++ b/source/storage/storage-rocksdb/src/main/java/com/jd/blockchain/storage/service/impl/rocksdb/RocksDBConnectionFactory.java @@ -98,7 +98,7 @@ public class RocksDBConnectionFactory implements DbConnectionFactory { long tableBlockSize = getLong(dbProperties, "table.blockSize", 4 * SizeUnit.KB); long tableMetadataBlockSize = getLong(dbProperties, "table.metadata.blockSize", 4 * SizeUnit.KB); - int tableBloomBitsPerKey = getInt(dbProperties, "table.bloom.bitsPerKey", 16); + int tableBloomBitsPerKey = getInt(dbProperties, "table.bloom.bitsPerKey", -1); long optionWriteBufferSize = getLong(dbProperties, "option.writeBufferSize", 256 * SizeUnit.MB); int optionMaxWriteBufferNumber = getInt(dbProperties, "option.maxWriteBufferNumber", 7);